Table of Contents

Interface IRenderer

Namespace
Avalonia.Rendering
Assembly
Avalonia.Base.dll

Defines the interface for a renderer.

[PrivateApi]
public interface IRenderer : IDisposable
Inherited Members

Properties

Diagnostics

Gets a value indicating whether the renderer should draw specific diagnostics.

RendererDiagnostics Diagnostics { get; }

Property Value

RendererDiagnostics

Methods

AddDirty(Visual)

Mark a visual as dirty and needing re-rendering.

void AddDirty(Visual visual)

Parameters

visual Visual

The visual.

Paint(Rect)

Called when a paint notification is received by the control being rendered.

void Paint(Rect rect)

Parameters

rect Rect

The dirty rectangle.

RecalculateChildren(Visual)

Informs the renderer that the z-ordering of a visual's children has changed.

void RecalculateChildren(Visual visual)

Parameters

visual Visual

The visual.

Resized(Size)

Called when a resize notification is received by the control being rendered.

void Resized(Size size)

Parameters

size Size

The new size of the window.

Start()

Starts the renderer.

void Start()

Stop()

Stops the renderer.

void Stop()

TryGetRenderInterfaceFeature(Type)

Attempts to query for a feature from the platform render interface

ValueTask<object?> TryGetRenderInterfaceFeature(Type featureType)

Parameters

featureType Type

Returns

ValueTask<object>

Events

SceneInvalidated

Raised when a portion of the scene has been invalidated.

event EventHandler<SceneInvalidatedEventArgs>? SceneInvalidated

Event Type

EventHandler<SceneInvalidatedEventArgs>

Remarks

Indicates that the underlying low-level scene information has been updated. Used to signal that an update to the current pointer-over state may be required.