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
| Improve this Doc View SourceComplexPolygon(IPath[])
Initializes a new instance of the ComplexPolygon class.
Declaration
public ComplexPolygon(params IPath[] paths)
Parameters
Type | Name | Description |
---|---|---|
IPath[] | paths | The paths. |
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
| Improve this Doc View SourceBounds
Gets the bounds enclosing the path.
Declaration
public RectangleF Bounds { get; }
Property Value
Type | Description |
---|---|
RectangleF |
Paths
Gets the collection of paths that make up this shape.
Declaration
public IEnumerable<IPath> Paths { get; }
Property Value
Type | Description |
---|---|
IEnumerable<IPath> |
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 |
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. |