Class Matrix3x2Extensions
Extension methods for the Matrix3x2 struct.
Inherited Members
Namespace: SixLabors.ImageSharp
Assembly: SixLabors.ImageSharp.dll
Syntax
public static class Matrix3x2Extensions
Methods
| Improve this Doc View SourceCreateRotation(Single, PointF)
Creates a rotation matrix using the given rotation in radians and a center point.
Declaration
public static Matrix3x2 CreateRotation(float radians, PointF centerPoint)
Parameters
Type | Name | Description |
---|---|---|
Single | radians | The amount of rotation, in radians. |
PointF | centerPoint | The center point. |
Returns
Type | Description |
---|---|
Matrix3x2 | A rotation matrix. |
CreateRotationDegrees(Single)
Creates a rotation matrix using the given rotation in degrees.
Declaration
public static Matrix3x2 CreateRotationDegrees(float degrees)
Parameters
Type | Name | Description |
---|---|---|
Single | degrees | The amount of rotation, in degrees. |
Returns
Type | Description |
---|---|
Matrix3x2 | A rotation matrix. |
CreateRotationDegrees(Single, PointF)
Creates a rotation matrix using the given rotation in degrees and a center point.
Declaration
public static Matrix3x2 CreateRotationDegrees(float degrees, PointF centerPoint)
Parameters
Type | Name | Description |
---|---|---|
Single | degrees | The amount of rotation, in degrees. |
PointF | centerPoint | The center point. |
Returns
Type | Description |
---|---|
Matrix3x2 | A rotation matrix. |
CreateScale(SizeF)
Creates a scale matrix from the given vector scale.
Declaration
public static Matrix3x2 CreateScale(SizeF scales)
Parameters
Type | Name | Description |
---|---|---|
SizeF | scales | The scale to use. |
Returns
Type | Description |
---|---|
Matrix3x2 | A scaling matrix. |
CreateScale(SizeF, PointF)
Creates a scale matrix from the given vector scale with an offset from the given center point.
Declaration
public static Matrix3x2 CreateScale(SizeF scales, PointF centerPoint)
Parameters
Type | Name | Description |
---|---|---|
SizeF | scales | The scale to use. |
PointF | centerPoint | The center offset. |
Returns
Type | Description |
---|---|
Matrix3x2 | A scaling matrix. |
CreateScale(Single, PointF)
Creates a scale matrix that scales uniformly with the given scale with an offset from the given center.
Declaration
public static Matrix3x2 CreateScale(float scale, PointF centerPoint)
Parameters
Type | Name | Description |
---|---|---|
Single | scale | The uniform scale to use. |
PointF | centerPoint | The center offset. |
Returns
Type | Description |
---|---|
Matrix3x2 | A scaling matrix. |
CreateScale(Single, Single, PointF)
Creates a scale matrix that is offset by a given center point.
Declaration
public static Matrix3x2 CreateScale(float xScale, float yScale, PointF centerPoint)
Parameters
Type | Name | Description |
---|---|---|
Single | xScale | Value to scale by on the X-axis. |
Single | yScale | Value to scale by on the Y-axis. |
PointF | centerPoint | The center point. |
Returns
Type | Description |
---|---|
Matrix3x2 | A scaling matrix. |
CreateSkew(Single, Single, PointF)
Creates a skew matrix from the given angles in radians and a center point.
Declaration
public static Matrix3x2 CreateSkew(float radiansX, float radiansY, PointF centerPoint)
Parameters
Type | Name | Description |
---|---|---|
Single | radiansX | The X angle, in radians. |
Single | radiansY | The Y angle, in radians. |
PointF | centerPoint | The center point. |
Returns
Type | Description |
---|---|
Matrix3x2 | A skew matrix. |
CreateSkewDegrees(Single, Single)
Creates a skew matrix from the given angles in degrees.
Declaration
public static Matrix3x2 CreateSkewDegrees(float degreesX, float degreesY)
Parameters
Type | Name | Description |
---|---|---|
Single | degreesX | The X angle, in degrees. |
Single | degreesY | The Y angle, in degrees. |
Returns
Type | Description |
---|---|
Matrix3x2 | A skew matrix. |
CreateSkewDegrees(Single, Single, PointF)
Creates a skew matrix from the given angles in degrees and a center point.
Declaration
public static Matrix3x2 CreateSkewDegrees(float degreesX, float degreesY, PointF centerPoint)
Parameters
Type | Name | Description |
---|---|---|
Single | degreesX | The X angle, in degrees. |
Single | degreesY | The Y angle, in degrees. |
PointF | centerPoint | The center point. |
Returns
Type | Description |
---|---|
Matrix3x2 | A skew matrix. |
CreateTranslation(PointF)
Creates a translation matrix from the given vector.
Declaration
public static Matrix3x2 CreateTranslation(PointF position)
Parameters
Type | Name | Description |
---|---|---|
PointF | position | The translation position. |
Returns
Type | Description |
---|---|
Matrix3x2 | A translation matrix. |