Table of Contents

Class LinearLineSegment

Namespace
SixLabors.ImageSharp.Drawing
Assembly
SixLabors.ImageSharp.Drawing.dll

Represents a series of control points that will be joined by straight lines

public sealed class LinearLineSegment : ILineSegment
Inheritance
LinearLineSegment
Implements
Inherited Members

Constructors

LinearLineSegment(PointF, PointF)

Initializes a new instance of the LinearLineSegment class.

public LinearLineSegment(PointF start, PointF end)

Parameters

start PointF

The start.

end PointF

The end.

LinearLineSegment(PointF, PointF, params PointF[])

Initializes a new instance of the LinearLineSegment class.

public LinearLineSegment(PointF point1, PointF point2, params PointF[] additionalPoints)

Parameters

point1 PointF

The point1.

point2 PointF

The point2.

additionalPoints PointF[]

Additional points

LinearLineSegment(PointF[])

Initializes a new instance of the LinearLineSegment class.

public LinearLineSegment(PointF[] points)

Parameters

points PointF[]

The points.

Properties

Bounds

Gets the bounds of the linearized segment output.

public RectangleF Bounds { get; }

Property Value

RectangleF

EndPoint

Gets the end point.

public PointF EndPoint { get; }

Property Value

PointF

The end point.

StartPoint

Gets the start point.

public PointF StartPoint { get; }

Property Value

PointF

Methods

CopyTo(Span<PointF>, bool, Vector2)

Writes the segment's linearized points to destination, baked at the supplied device-space scale.

public void CopyTo(Span<PointF> destination, bool skipFirstPoint, Vector2 scale)

Parameters

destination Span<PointF>

The destination point span.

skipFirstPoint bool

Whether to skip the first emitted point.

scale Vector2

The X/Y scale at which curves are flattened. Pass One for local-space output.

LinearVertexCount(Vector2)

Returns the number of linear vertices emitted by this segment when flattened under the supplied device-space scale.

public int LinearVertexCount(Vector2 scale)

Parameters

scale Vector2

The X/Y scale at which curves are flattened. Pass One for local-space counts.

Returns

int

The number of linear vertices this segment emits.

Transform(Matrix4x4)

Transforms the current LineSegment using specified matrix.

public LinearLineSegment Transform(Matrix4x4 matrix)

Parameters

matrix Matrix4x4

The matrix.

Returns

LinearLineSegment

A line segment with the matrix applied to it.

See Also