Class EllipsePolygon
An elliptical shape made up of a single path made up of one of more ILineSegments.
Inherited Members
Namespace: SixLabors.ImageSharp.Drawing
Assembly: SixLabors.ImageSharp.Drawing.dll
Syntax
public sealed class EllipsePolygon : ISimplePath, IPath
Constructors
| Improve this Doc View SourceEllipsePolygon(PointF, SizeF)
Initializes a new instance of the EllipsePolygon class.
Declaration
public EllipsePolygon(PointF location, SizeF size)
Parameters
Type | Name | Description |
---|---|---|
PointF | location | The location the center of the ellipse will be placed. |
SizeF | size | The width/height of the final ellipse. |
EllipsePolygon(PointF, Single)
Initializes a new instance of the EllipsePolygon class.
Declaration
public EllipsePolygon(PointF location, float radius)
Parameters
Type | Name | Description |
---|---|---|
PointF | location | The location the center of the circle will be placed. |
Single | radius | The radius final circle. |
EllipsePolygon(Single, Single, Single)
Initializes a new instance of the EllipsePolygon class.
Declaration
public EllipsePolygon(float x, float y, float radius)
Parameters
Type | Name | Description |
---|---|---|
Single | x | The x-coordinate of the center of the circle. |
Single | y | The y-coordinate of the center of the circle. |
Single | radius | The radius final circle. |
EllipsePolygon(Single, Single, Single, Single)
Initializes a new instance of the EllipsePolygon class.
Declaration
public EllipsePolygon(float x, float y, float width, float height)
Parameters
Type | Name | Description |
---|---|---|
Single | x | The x-coordinate of the center of the ellipse. |
Single | y | The y-coordinate of the center of the ellipse. |
Single | width | The width the ellipse should have. |
Single | height | The height the ellipse should have. |
Properties
| Improve this Doc View SourceBounds
Gets the bounds enclosing the path.
Declaration
public RectangleF Bounds { get; }
Property Value
Type | Description |
---|---|
RectangleF |
IsClosed
Gets a value indicating whether this instance is a closed path.
Declaration
public bool IsClosed { get; }
Property Value
Type | Description |
---|---|
Boolean |
PathType
Gets a value indicating whether this instance is closed, open or a composite path with a mixture of open and closed figures.
Declaration
public PathTypes PathType { get; }
Property Value
Type | Description |
---|---|
PathTypes |
Points
Gets the points that make this up as a simple linear path.
Declaration
public ReadOnlyMemory<PointF> Points { get; }
Property Value
Type | Description |
---|---|
ReadOnlyMemory<PointF> |
Methods
| Improve this Doc View SourceAsClosedPath()
Returns this path with all figures closed.
Declaration
public IPath AsClosedPath()
Returns
Type | Description |
---|---|
IPath | Returns the path as a closed path. |
Flatten()
Converts the IPath into a simple linear path.
Declaration
public IEnumerable<ISimplePath> Flatten()
Returns
Type | Description |
---|---|
IEnumerable<ISimplePath> | Returns the current IPath as simple linear path. |
Transform(Matrix3x2)
Transforms the path using the specified matrix.
Declaration
public IPath Transform(Matrix3x2 matrix)
Parameters
Type | Name | Description |
---|---|---|
Matrix3x2 | matrix | The matrix. |
Returns
Type | Description |
---|---|
IPath | A new path with the matrix applied to it. |