Table of Contents

Class ArcLineSegment

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

Represents a line segment that contains radii and angles that will be rendered as a elliptical arc.

public class ArcLineSegment : ILineSegment
Inheritance
ArcLineSegment
Implements
Inherited Members

Constructors

ArcLineSegment(PointF, PointF, SizeF, float, bool, bool)

Initializes a new instance of the ArcLineSegment class.

public ArcLineSegment(PointF from, PointF to, SizeF radius, float rotation, bool largeArc, bool sweep)

Parameters

from PointF

The absolute coordinates of the current point on the path.

to PointF

The absolute coordinates of the final point of the arc.

radius SizeF

The radii of the ellipse (also known as its semi-major and semi-minor axes).

rotation float

The angle, in degrees, from the x-axis of the current coordinate system to the x-axis of the ellipse.

largeArc bool

The large arc flag, and is false if an arc spanning less than or equal to 180 degrees is chosen, or true if an arc spanning greater than 180 degrees is chosen.

sweep bool

The sweep flag, and is false if the line joining center to arc sweeps through decreasing angles, or true if it sweeps through increasing angles.

ArcLineSegment(PointF, SizeF, float, float, float)

Initializes a new instance of the ArcLineSegment class.

public ArcLineSegment(PointF center, SizeF radius, float rotation, float startAngle, float sweepAngle)

Parameters

center PointF

The coordinates of the center of the ellipse.

radius SizeF

The radii of the ellipse (also known as its semi-major and semi-minor axes).

rotation float

The angle, in degrees, from the x-axis of the current coordinate system to the x-axis of the ellipse.

startAngle float

The start angle of the elliptical arc prior to the stretch and rotate operations. (0 is at the 3 o'clock position of the arc's circle).

sweepAngle float

The angle between startAngle and the end of the arc.

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 ArcLineSegment using specified matrix.

public ILineSegment Transform(Matrix4x4 matrix)

Parameters

matrix Matrix4x4

The transformation matrix.

Returns

ILineSegment

An ArcLineSegment with the matrix applied to it.