Class PathExtensions
Convenience methods that can be applied to shapes and paths.
Inherited Members
Namespace: SixLabors.ImageSharp.Drawing
Assembly: SixLabors.ImageSharp.Drawing.dll
Syntax
public static class PathExtensions
Methods
| Improve this Doc View SourceRotate(IPath, Single)
Creates a path rotated by the specified radians around its center.
Declaration
public static IPath Rotate(this IPath path, float radians)
Parameters
| Type | Name | Description |
|---|---|---|
| IPath | path | The path to rotate. |
| Single | radians | The radians to rotate the path. |
Returns
| Type | Description |
|---|---|
| IPath | A IPath with a rotate transform applied. |
Rotate(IPathCollection, Single)
Creates a path rotated by the specified radians around its center.
Declaration
public static IPathCollection Rotate(this IPathCollection path, float radians)
Parameters
| Type | Name | Description |
|---|---|---|
| IPathCollection | path | The path to rotate. |
| Single | radians | The radians to rotate the path. |
Returns
| Type | Description |
|---|---|
| IPathCollection | A IPath with a rotate transform applied. |
RotateDegree(IPath, Single)
Creates a path rotated by the specified degrees around its center.
Declaration
public static IPath RotateDegree(this IPath shape, float degree)
Parameters
| Type | Name | Description |
|---|---|---|
| IPath | shape | The path to rotate. |
| Single | degree | The degree to rotate the path. |
Returns
| Type | Description |
|---|---|
| IPath | A IPath with a rotate transform applied. |
RotateDegree(IPathCollection, Single)
Creates a path rotated by the specified degrees around its center.
Declaration
public static IPathCollection RotateDegree(this IPathCollection shape, float degree)
Parameters
| Type | Name | Description |
|---|---|---|
| IPathCollection | shape | The path to rotate. |
| Single | degree | The degree to rotate the path. |
Returns
| Type | Description |
|---|---|
| IPathCollection | A IPath with a rotate transform applied. |
Scale(IPath, Single)
Creates a path translated by the supplied postion
Declaration
public static IPath Scale(this IPath path, float scale)
Parameters
| Type | Name | Description |
|---|---|---|
| IPath | path | The path to translate. |
| Single | scale | The amount to scale along both the x and y axis. |
Returns
| Type | Description |
|---|---|
| IPath | A IPath with a translate transform applied. |
Scale(IPath, Single, Single)
Creates a path translated by the supplied postion
Declaration
public static IPath Scale(this IPath path, float scaleX, float scaleY)
Parameters
| Type | Name | Description |
|---|---|---|
| IPath | path | The path to translate. |
| Single | scaleX | The amount to scale along the X axis. |
| Single | scaleY | The amount to scale along the Y axis. |
Returns
| Type | Description |
|---|---|
| IPath | A IPath with a translate transform applied. |
Scale(IPathCollection, Single)
Creates a path translated by the supplied postion
Declaration
public static IPathCollection Scale(this IPathCollection path, float scale)
Parameters
| Type | Name | Description |
|---|---|---|
| IPathCollection | path | The path to translate. |
| Single | scale | The amount to scale along both the x and y axis. |
Returns
| Type | Description |
|---|---|
| IPathCollection | A IPath with a translate transform applied. |
Scale(IPathCollection, Single, Single)
Creates a path translated by the supplied postion
Declaration
public static IPathCollection Scale(this IPathCollection path, float scaleX, float scaleY)
Parameters
| Type | Name | Description |
|---|---|---|
| IPathCollection | path | The path to translate. |
| Single | scaleX | The amount to scale along the X axis. |
| Single | scaleY | The amount to scale along the Y axis. |
Returns
| Type | Description |
|---|---|
| IPathCollection | A IPath with a translate transform applied. |
Translate(IPath, PointF)
Creates a path translated by the supplied postion
Declaration
public static IPath Translate(this IPath path, PointF position)
Parameters
| Type | Name | Description |
|---|---|---|
| IPath | path | The path to translate. |
| PointF | position | The translation position. |
Returns
| Type | Description |
|---|---|
| IPath | A IPath with a translate transform applied. |
Translate(IPath, Single, Single)
Creates a path translated by the supplied postion
Declaration
public static IPath Translate(this IPath path, float x, float y)
Parameters
| Type | Name | Description |
|---|---|---|
| IPath | path | The path to translate. |
| Single | x | The amount to translate along the X axis. |
| Single | y | The amount to translate along the Y axis. |
Returns
| Type | Description |
|---|---|
| IPath | A IPath with a translate transform applied. |
Translate(IPathCollection, PointF)
Creates a path translated by the supplied postion
Declaration
public static IPathCollection Translate(this IPathCollection path, PointF position)
Parameters
| Type | Name | Description |
|---|---|---|
| IPathCollection | path | The path to translate. |
| PointF | position | The translation position. |
Returns
| Type | Description |
|---|---|
| IPathCollection | A IPath with a translate transform applied. |
Translate(IPathCollection, Single, Single)
Creates a path translated by the supplied postion
Declaration
public static IPathCollection Translate(this IPathCollection path, float x, float y)
Parameters
| Type | Name | Description |
|---|---|---|
| IPathCollection | path | The path to translate. |
| Single | x | The amount to translate along the X axis. |
| Single | y | The amount to translate along the Y axis. |
Returns
| Type | Description |
|---|---|
| IPathCollection | A IPath with a translate transform applied. |