Class AvaloniaSurface
Represents a surface for Avalonia integration, providing mouse, keyboard, and touch dispatchers.
Inherited Members
Namespace: Evergine.Avalonia
Assembly: Evergine.Avalonia.dll
Syntax
public class AvaloniaSurface : Surface
Constructors
AvaloniaSurface(uint, uint)
Initializes a new instance of the AvaloniaSurface class.
Declaration
public AvaloniaSurface(uint width, uint height)
Parameters
| Type | Name | Description |
|---|---|---|
| uint | width | The width of the surface. |
| uint | height | The height of the surface. |
Properties
Info
Gets the SurfaceInfo associated with this surface.
Declaration
public SurfaceInfo Info { get; }
Property Value
| Type | Description |
|---|---|
| SurfaceInfo |
KeyboardDispatcher
Gets the keyboard dispatcher for this surface.
Declaration
public override KeyboardDispatcher KeyboardDispatcher { get; }
Property Value
| Type | Description |
|---|---|
| KeyboardDispatcher |
Overrides
MouseDispatcher
Gets the mouse dispatcher for this surface.
Declaration
public override MouseDispatcher MouseDispatcher { get; }
Property Value
| Type | Description |
|---|---|
| MouseDispatcher |
Overrides
TouchDispatcher
Gets the touch dispatcher for this surface.
Declaration
public override PointerDispatcher TouchDispatcher { get; }
Property Value
| Type | Description |
|---|---|
| PointerDispatcher |
Overrides
Methods
SetDpiDensity(float)
Sets the DPI density for this surface.
Declaration
public void SetDpiDensity(float dpiDensity)
Parameters
| Type | Name | Description |
|---|---|---|
| float | dpiDensity | The DPI density value. |
SetSurfaceInfo(SurfaceInfo)
Sets the SurfaceInfo for this surface and triggers the info changed event.
Declaration
public void SetSurfaceInfo(SurfaceInfo surfaceInfo)
Parameters
| Type | Name | Description |
|---|---|---|
| SurfaceInfo | surfaceInfo | The new SurfaceInfo to associate with this surface. |
UpdateSize(uint, uint)
Updates the size of the surface and triggers the size changed event.
Declaration
public void UpdateSize(uint width, uint height)
Parameters
| Type | Name | Description |
|---|---|---|
| uint | width | The new width of the surface. |
| uint | height | The new height of the surface. |