Class ArcLineSegment
Represents a line segment that contains radii and angles that will be rendered as a elliptical arc.
Implements
Inherited Members
Namespace: SixLabors.ImageSharp.Drawing
Assembly: SixLabors.ImageSharp.Drawing.dll
Syntax
public class ArcLineSegment : ILineSegment
Constructors
| Edit this page View SourceArcLineSegment(PointF, PointF, SizeF, float, bool, bool)
Initializes a new instance of the ArcLineSegment class.
Declaration
public ArcLineSegment(PointF from, PointF to, SizeF radius, float rotation, bool largeArc, bool sweep)
Parameters
| Type | Name | Description |
|---|---|---|
| PointF | from | The absolute coordinates of the current point on the path. |
| PointF | to | The absolute coordinates of the final point of the arc. |
| SizeF | radius | The radii of the ellipse (also known as its semi-major and semi-minor axes). |
| float | rotation | The angle, in degrees, from the x-axis of the current coordinate system to the x-axis of the ellipse. |
| bool | largeArc | 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. |
| bool | sweep | 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.
Declaration
public ArcLineSegment(PointF center, SizeF radius, float rotation, float startAngle, float sweepAngle)
Parameters
| Type | Name | Description |
|---|---|---|
| PointF | center | The coordinates of the center of the ellipse. |
| SizeF | radius | The radii of the ellipse (also known as its semi-major and semi-minor axes). |
| float | rotation | The angle, in degrees, from the x-axis of the current coordinate system to the x-axis of the ellipse. |
| float | startAngle | 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). |
| float | sweepAngle | The angle between |
Properties
| Edit this page View SourceEndPoint
Gets the end point.
Declaration
public PointF EndPoint { get; }
Property Value
| Type | Description |
|---|---|
| PointF | The end point. |
Methods
| Edit this page View SourceFlatten()
Converts the ILineSegment into a simple linear path..
Declaration
public ReadOnlyMemory<PointF> Flatten()
Returns
| Type | Description |
|---|---|
| ReadOnlyMemory<PointF> | Returns the current ILineSegment as simple linear path. |
Transform(Matrix3x2)
Transforms the current ArcLineSegment using specified matrix.
Declaration
public ILineSegment Transform(Matrix3x2 matrix)
Parameters
| Type | Name | Description |
|---|---|---|
| Matrix3x2 | matrix | The transformation matrix. |
Returns
| Type | Description |
|---|---|
| ILineSegment | An ArcLineSegment with the matrix applied to it. |