Skip to main content

Class VelloDrawEventArgs

Namespace: VelloSharp.Avalonia.Controls
Assembly: VelloSharp.Avalonia.Controls.dll

Provides data for a Vello drawing pass.

public sealed class VelloDrawEventArgs : EventArgs

Inheritance

objectEventArgsVelloDrawEventArgs

Inherited Members

EventArgs.Empty, object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()

Properties

Bounds

Gets the bounds of the control that initiated the draw.

public Rect Bounds { get; }

Property Value

Rect

DeltaTime

Gets the delta time since the previous draw.

public TimeSpan DeltaTime { get; }

Property Value

TimeSpan

GlobalTransform

Gets the transform as a for use with Vello primitives.

public Matrix3x2 GlobalTransform { get; }

Property Value

Matrix3x2

Lease

Gets the underlying lease that provides access to the Vello renderer for this draw. The lease remains owned by the control and must not be disposed by callers.

public IVelloApiLease Lease { get; }

Property Value

IVelloApiLease

RenderParams

Gets the render parameters associated with the current draw.

public RenderParams RenderParams { get; }

Property Value

RenderParams

Scene

Gets the scene that is currently being recorded.

public Scene Scene { get; }

Property Value

Scene

TotalTime

Gets the total time reported by the control.

public TimeSpan TotalTime { get; }

Property Value

TimeSpan

Transform

Gets the transform applied to the drawing context.

public Matrix Transform { get; }

Property Value

Matrix

Methods

ScheduleWgpuSurfaceRender(Action<WgpuSurfaceRenderContext>)

Schedules a callback that will be executed on the swapchain surface prior to compositing.

public void ScheduleWgpuSurfaceRender(Action<WgpuSurfaceRenderContext> renderAction)

Parameters

renderAction Action<WgpuSurfaceRenderContext>

TryLeasePlatformGraphics()

Attempts to lease the platform graphics objects for direct wgpu access.

public IVelloPlatformGraphicsLease? TryLeasePlatformGraphics()

Returns

IVelloPlatformGraphicsLease?

An or null when unavailable.