Table of Contents

Struct StrokeLineSegmentCommand

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

One explicit stroked two-point line-segment command queued by the canvas batcher.

public readonly struct StrokeLineSegmentCommand
Inherited Members

Constructors

StrokeLineSegmentCommand(PointF, PointF, Brush, DrawingOptions, in RasterizerOptions, Rectangle, Point, Pen, bool)

Initializes a new instance of the StrokeLineSegmentCommand struct.

public StrokeLineSegmentCommand(PointF sourceStart, PointF sourceEnd, Brush brush, DrawingOptions drawingOptions, in RasterizerOptions rasterizerOptions, Rectangle targetBounds, Point destinationOffset, Pen pen, bool isInsideLayer)

Parameters

sourceStart PointF

The source line start point.

sourceEnd PointF

The source line end point.

brush Brush

The brush used to shade the stroke.

drawingOptions DrawingOptions

The drawing options (graphics, shape, transform) used during composition.

rasterizerOptions RasterizerOptions

The rasterizer options used to generate coverage.

targetBounds Rectangle

The absolute bounds of the logical target.

destinationOffset Point

The absolute destination offset of the command.

pen Pen

The stroke metadata.

isInsideLayer bool

True if the command was recorded inside a layer.

Properties

Brush

Gets the brush used during composition.

public Brush Brush { get; }

Property Value

Brush

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

GraphicsOptions

Gets the graphics options used during composition.

public GraphicsOptions GraphicsOptions { get; }

Property Value

GraphicsOptions

IsInsideLayer

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

public bool IsInsideLayer { get; }

Property Value

bool

Pen

Gets the stroke metadata for this command.

public Pen Pen { get; }

Property Value

Pen

RasterizerOptions

Gets the rasterizer options used to generate coverage.

public RasterizerOptions RasterizerOptions { get; }

Property Value

RasterizerOptions

SourceEnd

Gets the source line end point.

public PointF SourceEnd { get; }

Property Value

PointF

SourceStart

Gets the source line start point.

public PointF SourceStart { get; }

Property Value

PointF

TargetBounds

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

public Rectangle TargetBounds { get; }

Property Value

Rectangle

Transform

Gets the command transform.

public Matrix4x4 Transform { get; }

Property Value

Matrix4x4

Methods

GetConservativeBounds(PointF, PointF, Pen)

Computes the conservative stroked bounds of one two-point line segment.

public static RectangleF GetConservativeBounds(PointF start, PointF end, Pen pen)

Parameters

start PointF

The line start point.

end PointF

The line end point.

pen Pen

The stroke metadata.

Returns

RectangleF

The conservative stroked bounds.