Class DefaultDrawingBackend
- Namespace
- SixLabors.ImageSharp.Drawing.Processing.Backends
- Assembly
- SixLabors.ImageSharp.Drawing.dll
CPU backend that executes path coverage rasterization and brush composition directly against a CPU region.
public sealed class DefaultDrawingBackend : IDrawingBackend
- Inheritance
-
DefaultDrawingBackend
- Implements
- Inherited Members
Properties
Instance
Gets the default backend instance.
public static DefaultDrawingBackend Instance { get; }
Property Value
Methods
ComposeLayer<TPixel>(Configuration, ICanvasFrame<TPixel>, ICanvasFrame<TPixel>, Point, GraphicsOptions)
Composites one CPU-backed frame onto another using the supplied graphics options.
public static void ComposeLayer<TPixel>(Configuration configuration, ICanvasFrame<TPixel> source, ICanvasFrame<TPixel> destination, Point destinationOffset, GraphicsOptions options) where TPixel : unmanaged, IPixel<TPixel>
Parameters
configurationConfigurationThe active processing configuration.
sourceICanvasFrame<TPixel>The source frame.
destinationICanvasFrame<TPixel>The destination frame.
destinationOffsetPointThe destination offset relative to
destination.optionsGraphicsOptionsThe graphics options controlling composition.
Type Parameters
TPixelThe pixel format.
CreateScene(Configuration, Rectangle, DrawingCommandBatch, IReadOnlyList<IDisposable>?)
Creates a retained backend scene from a prepared command batch.
public DrawingBackendScene CreateScene(Configuration configuration, Rectangle targetBounds, DrawingCommandBatch commandBatch, IReadOnlyList<IDisposable>? ownedResources = null)
Parameters
configurationConfigurationThe active processing configuration.
targetBoundsRectangleThe target bounds used for target-dependent scene data.
commandBatchDrawingCommandBatchThe scene commands in submission order.
ownedResourcesIReadOnlyList<IDisposable>The resources that must stay alive for the returned scene.
Returns
- DrawingBackendScene
A retained backend scene.
ReadRegion<TPixel>(Configuration, ICanvasFrame<TPixel>, Rectangle, Buffer2DRegion<TPixel>)
Reads source pixels from the target into the destination region.
public void ReadRegion<TPixel>(Configuration configuration, ICanvasFrame<TPixel> target, Rectangle sourceRectangle, Buffer2DRegion<TPixel> destination) where TPixel : unmanaged, IPixel<TPixel>
Parameters
configurationConfigurationThe active processing configuration.
targetICanvasFrame<TPixel>The target frame.
sourceRectangleRectangleThe source rectangle in target-local coordinates.
destinationBuffer2DRegion<TPixel>The destination region that receives the copied pixels.
Type Parameters
TPixelThe pixel format.
RenderScene<TPixel>(Configuration, ICanvasFrame<TPixel>, DrawingBackendScene)
Renders a retained backend scene into the target.
public void RenderScene<TPixel>(Configuration configuration, ICanvasFrame<TPixel> target, DrawingBackendScene scene) where TPixel : unmanaged, IPixel<TPixel>
Parameters
configurationConfigurationThe active processing configuration.
targetICanvasFrame<TPixel>The target frame.
sceneDrawingBackendSceneThe retained backend scene to render.
Type Parameters
TPixelThe pixel format.