Table of Contents

Struct CompositionCommand

Namespace
SixLabors.ImageSharp.Drawing.Processing.Backends
Assembly
SixLabors.ImageSharp.Drawing.dll

One normalized fill-path or layer-based composition command queued for backend execution.

public readonly struct CompositionCommand
Inherited Members

Remarks

This type carries fill-path commands plus inline layer boundaries.

Properties

ApplyCanvasBounds

Gets the canvas bounds available to an Apply command.

public Rectangle ApplyCanvasBounds { get; }

Property Value

Rectangle

ApplyEffect

Gets the layer effect carried by an Apply command, or null when the command represents a direct Apply operation.

public LayerEffect? ApplyEffect { get; }

Property Value

LayerEffect

ApplyOperation

Gets the image processor carried by an Apply command.

public Action<IImageProcessingContext> ApplyOperation { get; }

Property Value

Action<IImageProcessingContext>

ApplyOutputBounds

Gets the local bounds within which an Apply command writes its processed output.

public RectangleF ApplyOutputBounds { get; }

Property Value

RectangleF

ApplyWriteBackOffset

Gets the offset subtracted from an Apply command's write rectangle when reading the source pixels, so a write-back recorded at an offset still reads the pre-offset region.

public Point ApplyWriteBackOffset { get; }

Property Value

Point

Brush

Gets the brush used during composition.

public Brush Brush { get; }

Property Value

Brush

ClipDescriptor

Gets the clip descriptor opened by a BeginClip command.

public DrawingClipDescriptor ClipDescriptor { get; }

Property Value

DrawingClipDescriptor

Remarks

The ordered begin/end-clip command stream is the single source of truth for clipping. Draw commands do not carry clip state; backends resolve the active clip stack from the stream commands surrounding each draw.

DestinationOffset

Gets the absolute destination offset where the local coverage should be composited.

public Point DestinationOffset { get; }

Property Value

Point

DrawingOptions

Gets the drawing options carried by the command.

public DrawingOptions DrawingOptions { get; }

Property Value

DrawingOptions

IsInsideLayer

Gets a value indicating whether the command was recorded inside a layer.

public bool IsInsideLayer { get; }

Property Value

bool

Kind

Gets the command kind.

public CompositionCommandKind Kind { get; }

Property Value

CompositionCommandKind

LayerBounds

Gets the absolute bounds of the layer opened by this command.

public Rectangle LayerBounds { get; }

Property Value

Rectangle

Remarks

Only meaningful for BeginLayer and EndLayer.

LayerOptions

Gets graphics options used by layer compositing commands.

public GraphicsOptions LayerOptions { get; }

Property Value

GraphicsOptions

Remarks

Only valid for commands that carry layer state; accessing it on other commands throws.

RasterizerOptions

Gets rasterizer options used to generate coverage.

public RasterizerOptions RasterizerOptions { get; }

Property Value

RasterizerOptions

RequiresScopedApply

Gets a value indicating whether this layer command must be rendered as an isolated target for Apply.

public bool RequiresScopedApply { get; }

Property Value

bool

SourcePath

Gets the source path carried by the command.

public IPath SourcePath { get; }

Property Value

IPath

SubPixelOffset

Gets the fractional translation applied after the drawing options transform. Glyph geometry rides an integer destination offset; the sub-pixel remainder travels here so the queued command does not need per-operation drawing options to carry it.

public Vector2 SubPixelOffset { get; }

Property Value

Vector2

TargetBounds

Gets the absolute bounds of the logical target for this command.

public Rectangle TargetBounds { get; }

Property Value

Rectangle

Transform

Gets the command transform: the drawing options transform followed by the sub-pixel translation.

public Matrix4x4 Transform { get; }

Property Value

Matrix4x4