Class Matrix3x2Extensions
Extension methods for the Matrix3x2 struct.
Inherited Members
Namespace: SixLabors.ImageSharp
Assembly: SixLabors.ImageSharp.dll
Syntax
public static class Matrix3x2Extensions
Methods
| Edit this page View SourceCreateRotation(float, 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 |
---|---|---|
float | radians | The amount of rotation, in radians. |
PointF | centerPoint | The center point. |
Returns
Type | Description |
---|---|
Matrix3x2 | A rotation matrix. |
CreateRotationDegrees(float)
Creates a rotation matrix using the given rotation in degrees.
Declaration
public static Matrix3x2 CreateRotationDegrees(float degrees)
Parameters
Type | Name | Description |
---|---|---|
float | degrees | The amount of rotation, in degrees. |
Returns
Type | Description |
---|---|
Matrix3x2 | A rotation matrix. |
CreateRotationDegrees(float, 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 |
---|---|---|
float | 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(float, 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 |
---|---|---|
float | scale | The uniform scale to use. |
PointF | centerPoint | The center offset. |
Returns
Type | Description |
---|---|
Matrix3x2 | A scaling matrix. |
CreateScale(float, float, 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 |
---|---|---|
float | xScale | Value to scale by on the X-axis. |
float | yScale | Value to scale by on the Y-axis. |
PointF | centerPoint | The center point. |
Returns
Type | Description |
---|---|
Matrix3x2 | A scaling matrix. |
CreateSkew(float, float, 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 |
---|---|---|
float | radiansX | The X angle, in radians. |
float | radiansY | The Y angle, in radians. |
PointF | centerPoint | The center point. |
Returns
Type | Description |
---|---|
Matrix3x2 | A skew matrix. |
CreateSkewDegrees(float, float)
Creates a skew matrix from the given angles in degrees.
Declaration
public static Matrix3x2 CreateSkewDegrees(float degreesX, float degreesY)
Parameters
Type | Name | Description |
---|---|---|
float | degreesX | The X angle, in degrees. |
float | degreesY | The Y angle, in degrees. |
Returns
Type | Description |
---|---|
Matrix3x2 | A skew matrix. |
CreateSkewDegrees(float, float, 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 |
---|---|---|
float | degreesX | The X angle, in degrees. |
float | 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. |