Class ClipPathExtensions
Provides extension methods to IPath that allow the clipping of shapes.
Inherited Members
Namespace: SixLabors.ImageSharp.Drawing
Assembly: SixLabors.ImageSharp.Drawing.dll
Syntax
public static class ClipPathExtensions
Methods
| Edit this page View SourceClip(IPath, params IPath[])
Clips the specified subject path with the provided clipping paths.
Declaration
public static IPath Clip(this IPath subjectPath, params IPath[] clipPaths)
Parameters
Type | Name | Description |
---|---|---|
IPath | subjectPath | The subject path. |
IPath[] | clipPaths | The clipping paths. |
Returns
Type | Description |
---|---|
IPath | The clipped IPath. |
Exceptions
Type | Condition |
---|---|
ClipperException | Thrown when an error occurred while attempting to clip the polygon. |
Clip(IPath, ShapeOptions, params IPath[])
Clips the specified subject path with the provided clipping paths.
Declaration
public static IPath Clip(this IPath subjectPath, ShapeOptions options, params IPath[] clipPaths)
Parameters
Type | Name | Description |
---|---|---|
IPath | subjectPath | The subject path. |
ShapeOptions | options | The shape options. |
IPath[] | clipPaths | The clipping paths. |
Returns
Type | Description |
---|---|
IPath | The clipped IPath. |
Exceptions
Type | Condition |
---|---|
ClipperException | Thrown when an error occurred while attempting to clip the polygon. |
Clip(IPath, ShapeOptions, IEnumerable<IPath>)
Clips the specified subject path with the provided clipping paths.
Declaration
public static IPath Clip(this IPath subjectPath, ShapeOptions options, IEnumerable<IPath> clipPaths)
Parameters
Type | Name | Description |
---|---|---|
IPath | subjectPath | The subject path. |
ShapeOptions | options | The shape options. |
IEnumerable<IPath> | clipPaths | The clipping paths. |
Returns
Type | Description |
---|---|
IPath | The clipped IPath. |
Exceptions
Type | Condition |
---|---|
ClipperException | Thrown when an error occurred while attempting to clip the polygon. |
Clip(IPath, IEnumerable<IPath>)
Clips the specified subject path with the provided clipping paths.
Declaration
public static IPath Clip(this IPath subjectPath, IEnumerable<IPath> clipPaths)
Parameters
Type | Name | Description |
---|---|---|
IPath | subjectPath | The subject path. |
IEnumerable<IPath> | clipPaths | The clipping paths. |
Returns
Type | Description |
---|---|
IPath | The clipped IPath. |
Exceptions
Type | Condition |
---|---|
ClipperException | Thrown when an error occurred while attempting to clip the polygon. |