SKDrawable Class

Definition

Represents the base class for objects that draw into SKCanvas.

public class SKDrawable : SkiaSharp.SKObject
Inheritance

Remarks

The object has a generation ID, which is guaranteed to be unique across all drawables. To allow for clients of the drawable that may want to cache the results, the drawable must change its generation ID whenever its internal state changes such that it will draw differently.

Constructors

SKDrawable()

Creates a new instance of SKDrawable.

SKDrawable(Boolean)

Creates a new instance of SKDrawable.

Properties

Bounds

Gets the conservative bounds of what the drawable will draw.

GenerationId

Gets the unique value for this instance.

Handle

Gets or sets the handle to the underlying native object.

(Inherited from SKObject)
IgnorePublicDispose

Gets or sets a value indicating whether the call the public Dispose() should be no-op.

(Inherited from SKNativeObject)
IsDisposed

Gets or sets a value indicating whether the object has already been disposed.

(Inherited from SKNativeObject)
OwnsHandle

Gets a value indicating whether this object should destroy the underlying native object.

(Inherited from SKObject)

Methods

Dispose()

Releases all resources used by this SKNativeObject.

(Inherited from SKNativeObject)
Dispose(Boolean)

Releases the unmanaged resources used by the SKDrawable and optionally releases the managed resources.

DisposeInternal()

Triggers a dispose, ignoring the value of IgnorePublicDispose.

(Inherited from SKNativeObject)
DisposeManaged()

Implemented by derived SKObject types to destroy any managed objects.

(Inherited from SKObject)
DisposeNative()

Implemented by derived SKObject types to destroy any native objects.

Draw(SKCanvas, Single, Single)

Draw the current drawable onto the specified canvas.

Draw(SKCanvas, SKMatrix)

Draw the current drawable onto the specified canvas.

NotifyDrawingChanged()

Invalidate the drawing generation ID, indicating that the drawing has changed.

OnDraw(SKCanvas)

Implemented by derived SKDrawable types to draw the drawable to the canvas.

OnGetBounds()

Implemented by derived SKDrawable types to return the conservative bounds of what the drawable will draw.

OnSnapshot()

Implemented by derived SKDrawable types to create an immutable snapshot of the drawing.

Snapshot()

Create an immutable snapshot of the drawing.

Applies to