Class ComplexPolygon
Represents a complex polygon made up of one or more shapes overlayed on each other, where overlaps causes holes.
Implements
Inherited Members
Namespace: SixLabors.ImageSharp.Drawing
Assembly: SixLabors.ImageSharp.Drawing.dll
Syntax
public sealed class ComplexPolygon : IPath
Constructors
| Edit this page View SourceComplexPolygon(params IPath[])
Initializes a new instance of the ComplexPolygon class.
Declaration
public ComplexPolygon(params IPath[] paths)
Parameters
Type | Name | Description |
---|---|---|
IPath[] | paths | The paths. |
ComplexPolygon(PointF[], PointF[])
Initializes a new instance of the ComplexPolygon class.
Declaration
public ComplexPolygon(PointF[] contour, PointF[] hole)
Parameters
Type | Name | Description |
---|---|---|
PointF[] | contour | The contour path. |
PointF[] | hole | The hole path. |
ComplexPolygon(IEnumerable<IPath>)
Initializes a new instance of the ComplexPolygon class.
Declaration
public ComplexPolygon(IEnumerable<IPath> paths)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<IPath> | paths | The paths. |
Properties
| Edit this page View SourceBounds
Gets the bounds enclosing the path.
Declaration
public RectangleF Bounds { get; }
Property Value
Type | Description |
---|---|
RectangleF |
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 |
Paths
Gets the collection of paths that make up this shape.
Declaration
public IEnumerable<IPath> Paths { get; }
Property Value
Type | Description |
---|---|
IEnumerable<IPath> |
Methods
| Edit this page View SourceAsClosedPath()
Returns this path with all figures closed.
Declaration
public IPath AsClosedPath()
Returns
Type | Description |
---|---|
IPath | A new close IPath. |
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. |