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
| Edit this page View SourceGenerateOutline(IPath, float)
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 |
float | 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, float, 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 |
float | 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, float, ReadOnlySpan<float>)
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 |
float | width | The outline width. |
ReadOnlySpan<float> | 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, float, ReadOnlySpan<float>, 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 |
float | width | The outline width. |
ReadOnlySpan<float> | 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, float, ReadOnlySpan<float>, bool)
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 |
float | width | The outline width. |
ReadOnlySpan<float> | pattern | The pattern made of multiples of the width. |
bool | 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, float, ReadOnlySpan<float>, bool, 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 |
float | width | The outline width. |
ReadOnlySpan<float> | pattern | The pattern made of multiples of the width. |
bool | 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. |