Class OutlinePathExtensions
Extensions to IPath that allow the generation of outlines.
Inherited Members
Namespace: SixLabors.ImageSharp.Drawing
Assembly: SixLabors.ImageSharp.Drawing.dll
Syntax
public static class OutlinePathExtensions
Methods
| Improve this Doc View SourceGenerateOutline(IPath, Single)
Generates an outline of the path.
Declaration
public static IPath GenerateOutline(this IPath path, float width)
Parameters
Type | Name | Description |
---|---|---|
IPath | path | The path to outline |
Single | width | The outline width. |
Returns
Type | Description |
---|---|
IPath | A new IPath representing the outline. |
Exceptions
Type | Condition |
---|---|
ClipperException | Thrown when an offset cannot be calculated. |
GenerateOutline(IPath, Single, JointStyle, EndCapStyle)
Generates an outline of the path.
Declaration
public static IPath GenerateOutline(this IPath path, float width, JointStyle jointStyle, EndCapStyle endCapStyle)
Parameters
Type | Name | Description |
---|---|---|
IPath | path | The path to outline |
Single | width | The outline width. |
JointStyle | jointStyle | The style to apply to the joints. |
EndCapStyle | endCapStyle | The style to apply to the end caps. |
Returns
Type | Description |
---|---|
IPath | A new IPath representing the outline. |
Exceptions
Type | Condition |
---|---|
ClipperException | Thrown when an offset cannot be calculated. |
GenerateOutline(IPath, Single, ReadOnlySpan<Single>)
Generates an outline of the path with alternating on and off segments based on the pattern.
Declaration
public static IPath GenerateOutline(this IPath path, float width, ReadOnlySpan<float> pattern)
Parameters
Type | Name | Description |
---|---|---|
IPath | path | The path to outline |
Single | width | The outline width. |
ReadOnlySpan<Single> | pattern | The pattern made of multiples of the width. |
Returns
Type | Description |
---|---|
IPath | A new IPath representing the outline. |
Exceptions
Type | Condition |
---|---|
ClipperException | Thrown when an offset cannot be calculated. |
GenerateOutline(IPath, Single, ReadOnlySpan<Single>, JointStyle, EndCapStyle)
Generates an outline of the path with alternating on and off segments based on the pattern.
Declaration
public static IPath GenerateOutline(this IPath path, float width, ReadOnlySpan<float> pattern, JointStyle jointStyle, EndCapStyle endCapStyle)
Parameters
Type | Name | Description |
---|---|---|
IPath | path | The path to outline |
Single | width | The outline width. |
ReadOnlySpan<Single> | pattern | The pattern made of multiples of the width. |
JointStyle | jointStyle | The style to apply to the joints. |
EndCapStyle | endCapStyle | The style to apply to the end caps. |
Returns
Type | Description |
---|---|
IPath | A new IPath representing the outline. |
Exceptions
Type | Condition |
---|---|
ClipperException | Thrown when an offset cannot be calculated. |
GenerateOutline(IPath, Single, ReadOnlySpan<Single>, Boolean)
Generates an outline of the path with alternating on and off segments based on the pattern.
Declaration
public static IPath GenerateOutline(this IPath path, float width, ReadOnlySpan<float> pattern, bool startOff)
Parameters
Type | Name | Description |
---|---|---|
IPath | path | The path to outline |
Single | width | The outline width. |
ReadOnlySpan<Single> | pattern | The pattern made of multiples of the width. |
Boolean | startOff | Whether the first item in the pattern is on or off. |
Returns
Type | Description |
---|---|
IPath | A new IPath representing the outline. |
Exceptions
Type | Condition |
---|---|
ClipperException | Thrown when an offset cannot be calculated. |
GenerateOutline(IPath, Single, ReadOnlySpan<Single>, Boolean, JointStyle, EndCapStyle)
Generates an outline of the path with alternating on and off segments based on the pattern.
Declaration
public static IPath GenerateOutline(this IPath path, float width, ReadOnlySpan<float> pattern, bool startOff, JointStyle jointStyle, EndCapStyle endCapStyle)
Parameters
Type | Name | Description |
---|---|---|
IPath | path | The path to outline |
Single | width | The outline width. |
ReadOnlySpan<Single> | pattern | The pattern made of multiples of the width. |
Boolean | startOff | Whether the first item in the pattern is on or off. |
JointStyle | jointStyle | The style to apply to the joints. |
EndCapStyle | endCapStyle | The style to apply to the end caps. |
Returns
Type | Description |
---|---|
IPath | A new IPath representing the outline. |
Exceptions
Type | Condition |
---|---|
ClipperException | Thrown when an offset cannot be calculated. |