Skip to main content

Class RenderSurfaceLease

Namespace: VelloSharp.Avalonia.Core.Surface
Assembly: VelloSharp.Avalonia.Core.dll

Represents a leased render surface and its associated native resources.

public abstract class RenderSurfaceLease : IDisposable

Inheritance​

object ← RenderSurfaceLease

Implements​

IDisposable

Inherited Members​

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()

Constructors​

RenderSurfaceLease(PixelSize, double)​

Initializes a new instance of .

protected RenderSurfaceLease(PixelSize pixelSize, double renderScaling)

Parameters​

pixelSize PixelSize

Pixel size of the surface.

renderScaling double

Render scaling applied to the surface.

Properties​

PixelSize​

Gets the pixel size of the surface.

public PixelSize PixelSize { get; protected set; }

Property Value​

PixelSize

RenderScaling​

Gets the render scaling (DPI multiplier) for the surface.

public double RenderScaling { get; protected set; }

Property Value​

double

Methods​

Dispose()​

Releases native resources held by the surface lease.

public void Dispose()

Dispose(bool)​

Invoked when is called.

protected virtual void Dispose(bool disposing)

Parameters​

disposing bool

GetRenderTarget()​

Returns the backend-specific render target for the current frame.

public abstract object GetRenderTarget()

Returns​

object

OnSurfaceChanged(PixelSize, double)​

Called when the surface size or scaling changes.

public virtual void OnSurfaceChanged(PixelSize pixelSize, double renderScaling)

Parameters​

pixelSize PixelSize

renderScaling double