Class DrawingBackendScene
- Namespace
- SixLabors.ImageSharp.Drawing.Processing.Backends
- Assembly
- SixLabors.ImageSharp.Drawing.dll
Base type for a retained backend scene: the lowered, reusable form of a batch of drawing commands produced by CreateScene(Configuration, Rectangle, DrawingCommandBatch, IReadOnlyList<IDisposable>?) and later rendered into a target through RenderScene<TPixel>(Configuration, ICanvasFrame<TPixel>, DrawingBackendScene).
public abstract class DrawingBackendScene : IDisposable
- Inheritance
-
DrawingBackendScene
- Implements
- Derived
- Inherited Members
Remarks
A scene captures everything a backend needs to replay the commands, including any resources (such as image-brush sources) that must remain alive until the scene is disposed. Disposing the scene releases backend-specific state through DisposeCore() and then the retained owned resources.
Constructors
DrawingBackendScene(Rectangle, IReadOnlyList<IDisposable>?)
Initializes a new instance of the DrawingBackendScene class.
protected DrawingBackendScene(Rectangle bounds, IReadOnlyList<IDisposable>? ownedResources)
Parameters
boundsRectangleThe target bounds used to create the scene.
ownedResourcesIReadOnlyList<IDisposable>Resources that must stay alive for the retained scene.
Properties
Bounds
Gets the target bounds used to create the scene.
public Rectangle Bounds { get; }
Property Value
Methods
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
DisposeCore()
Disposes backend-specific resources retained by this scene.
protected virtual void DisposeCore()