Struct D2D1Matrix3X2F
Represents a 3-by-2 matrix.
Implements
Inherited Members
Namespace: JeremyAnsel.DirectX.D2D1
Assembly: JeremyAnsel.DirectX.D2D1.dll
Syntax
public struct D2D1Matrix3X2F : IEquatable<D2D1Matrix3X2F>
Constructors
| Edit this page View SourceD2D1Matrix3X2F(float, float, float, float, float, float)
Initializes a new instance of the D2D1Matrix3X2F struct.
Declaration
public D2D1Matrix3X2F(float m11, float m12, float m21, float m22, float m31, float m32)
Parameters
Type | Name | Description |
---|---|---|
float | m11 | The value in the first row and first column of the matrix. |
float | m12 | The value in the first row and second column of the matrix. |
float | m21 | The value in the second row and first column of the matrix. |
float | m22 | The value in the second row and second column of the matrix. |
float | m31 | The value in the third row and first column of the matrix. |
float | m32 | The value in the third row and second column of the matrix. |
D2D1Matrix3X2F(float[])
Initializes a new instance of the D2D1Matrix3X2F struct.
Declaration
public D2D1Matrix3X2F(float[] values)
Parameters
Type | Name | Description |
---|---|---|
float[] | values | The values of the matrix. |
Properties
| Edit this page View SourceDeterminant
Gets the determinant of the matrix.
Declaration
public float Determinant { get; }
Property Value
Type | Description |
---|---|
float |
Identity
Gets an identity matrix.
Declaration
public static D2D1Matrix3X2F Identity { get; }
Property Value
Type | Description |
---|---|
D2D1Matrix3X2F |
IsIdentity
Gets a value indicating whether the matrix is the identity matrix.
Declaration
public bool IsIdentity { get; }
Property Value
Type | Description |
---|---|
bool |
IsInvertible
Gets a value indicating whether the matrix is invertible.
Declaration
public bool IsInvertible { get; }
Property Value
Type | Description |
---|---|
bool |
M11
Gets or sets the value in the first row and first column of the matrix.
Declaration
public float M11 { get; set; }
Property Value
Type | Description |
---|---|
float |
M12
Gets or sets the value in the first row and second column of the matrix.
Declaration
public float M12 { get; set; }
Property Value
Type | Description |
---|---|
float |
M21
Gets or sets the value in the second row and first column of the matrix.
Declaration
public float M21 { get; set; }
Property Value
Type | Description |
---|---|
float |
M22
Gets or sets the value in the second row and second column of the matrix.
Declaration
public float M22 { get; set; }
Property Value
Type | Description |
---|---|
float |
M31
Gets or sets the value in the third row and first column of the matrix.
Declaration
public float M31 { get; set; }
Property Value
Type | Description |
---|---|
float |
M32
Gets or sets the value in the third row and second column of the matrix.
Declaration
public float M32 { get; set; }
Property Value
Type | Description |
---|---|
float |
Methods
| Edit this page View SourceEquals(D2D1Matrix3X2F)
Determines whether the specified object is equal to the current object.
Declaration
public bool Equals(D2D1Matrix3X2F other)
Parameters
Type | Name | Description |
---|---|---|
D2D1Matrix3X2F | other | The object to compare with the current object. |
Returns
Type | Description |
---|---|
bool |
Equals(object)
Determines whether the specified object is equal to the current object.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
object | obj | The object to compare with the current object. |
Returns
Type | Description |
---|---|
bool |
Overrides
| Edit this page View SourceGetHashCode()
Returns the hash code for this instance.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int | A 32-bit signed integer that is the hash code for this instance. |
Overrides
| Edit this page View SourceInvert()
Inverts the matrix, if it is invertible.
Declaration
public bool Invert()
Returns
Type | Description |
---|---|
bool |
Multiply(D2D1Matrix3X2F, D2D1Matrix3X2F)
Multiplies the two matrices and stores the result in this matrix.
Declaration
public static D2D1Matrix3X2F Multiply(D2D1Matrix3X2F a, D2D1Matrix3X2F b)
Parameters
Type | Name | Description |
---|---|---|
D2D1Matrix3X2F | a | The first matrix to multiply. |
D2D1Matrix3X2F | b | The second matrix to multiply. |
Returns
Type | Description |
---|---|
D2D1Matrix3X2F | The result matrix. |
Rotation(float)
Creates a rotation transformation that has the specified angle.
Declaration
public static D2D1Matrix3X2F Rotation(float angle)
Parameters
Type | Name | Description |
---|---|---|
float | angle | The rotation angle in degrees. A positive angle creates a clockwise rotation, and a negative angle creates a counterclockwise rotation. |
Returns
Type | Description |
---|---|
D2D1Matrix3X2F | The new rotation transformation. |
Rotation(float, D2D1Point2F)
Creates a rotation transformation that has the specified angle and center point.
Declaration
public static D2D1Matrix3X2F Rotation(float angle, D2D1Point2F center)
Parameters
Type | Name | Description |
---|---|---|
float | angle | The rotation angle in degrees. A positive angle creates a clockwise rotation, and a negative angle creates a counterclockwise rotation. |
D2D1Point2F | center | The point about which the rotation is performed. |
Returns
Type | Description |
---|---|
D2D1Matrix3X2F | The new rotation transformation. |
Scale(D2D1SizeF)
Creates a scale transformation that has the specified scale factors.
Declaration
public static D2D1Matrix3X2F Scale(D2D1SizeF size)
Parameters
Type | Name | Description |
---|---|---|
D2D1SizeF | size | The x-axis and y-axis scale factors of the scale transformation. |
Returns
Type | Description |
---|---|
D2D1Matrix3X2F | The new scale transformation. |
Scale(D2D1SizeF, D2D1Point2F)
Creates a scale transformation that has the specified scale factors and center point.
Declaration
public static D2D1Matrix3X2F Scale(D2D1SizeF size, D2D1Point2F center)
Parameters
Type | Name | Description |
---|---|---|
D2D1SizeF | size | The x-axis and y-axis scale factors of the scale transformation. |
D2D1Point2F | center | The point about which the scale is performed. |
Returns
Type | Description |
---|---|
D2D1Matrix3X2F | The new scale transformation. |
Scale(float, float)
Creates a scale transformation that has the specified scale factors.
Declaration
public static D2D1Matrix3X2F Scale(float x, float y)
Parameters
Type | Name | Description |
---|---|---|
float | x | The x-axis scale factor of the scale transformation. |
float | y | The y-axis scale factor of the scale transformation. |
Returns
Type | Description |
---|---|
D2D1Matrix3X2F | The new scale transformation. |
Scale(float, float, D2D1Point2F)
Creates a scale transformation that has the specified scale factors and center point.
Declaration
public static D2D1Matrix3X2F Scale(float x, float y, D2D1Point2F center)
Parameters
Type | Name | Description |
---|---|---|
float | x | The x-axis scale factor of the scale transformation. |
float | y | The y-axis scale factor of the scale transformation. |
D2D1Point2F | center | The point about which the scale is performed. |
Returns
Type | Description |
---|---|
D2D1Matrix3X2F | The new scale transformation. |
Skew(float, float)
Creates a skew transformation that has the specified x-axis and y-axis values.
Declaration
public static D2D1Matrix3X2F Skew(float angleX, float angleY)
Parameters
Type | Name | Description |
---|---|---|
float | angleX | The x-axis skew angle, which is measured in degrees counterclockwise from the y-axis. |
float | angleY | The y-axis skew angle, which is measured in degrees clockwise from the x-axis. |
Returns
Type | Description |
---|---|
D2D1Matrix3X2F | The new skew transformation. |
Skew(float, float, D2D1Point2F)
Creates a skew transformation that has the specified x-axis and y-axis values and center point.
Declaration
public static D2D1Matrix3X2F Skew(float angleX, float angleY, D2D1Point2F center)
Parameters
Type | Name | Description |
---|---|---|
float | angleX | The x-axis skew angle, which is measured in degrees counterclockwise from the y-axis. |
float | angleY | The y-axis skew angle, which is measured in degrees clockwise from the x-axis. |
D2D1Point2F | center | The point about which the skew is performed. |
Returns
Type | Description |
---|---|
D2D1Matrix3X2F | The new skew transformation. |
TranformPoint(D2D1Point2F)
Uses this matrix to transform the specified point and returns the result.
Declaration
public D2D1Point2F TranformPoint(D2D1Point2F point)
Parameters
Type | Name | Description |
---|---|---|
D2D1Point2F | point | The point to transform. |
Returns
Type | Description |
---|---|
D2D1Point2F | The result point. |
Translation(D2D1SizeF)
Creates a translation transformation that has the specified x and y displacements.
Declaration
public static D2D1Matrix3X2F Translation(D2D1SizeF size)
Parameters
Type | Name | Description |
---|---|---|
D2D1SizeF | size | The distance to translate along the x-axis and the y-axis. |
Returns
Type | Description |
---|---|
D2D1Matrix3X2F | A transformation matrix that translates an object the specified horizontal and vertical distance. |
Translation(float, float)
Creates a translation transformation that has the specified x and y displacements.
Declaration
public static D2D1Matrix3X2F Translation(float x, float y)
Parameters
Type | Name | Description |
---|---|---|
float | x | The distance to translate along the x-axis. |
float | y | The distance to translate along the y-axis. |
Returns
Type | Description |
---|---|
D2D1Matrix3X2F | A transformation matrix that translates an object the specified horizontal and vertical distance. |
Operators
| Edit this page View Sourceoperator ==(D2D1Matrix3X2F, D2D1Matrix3X2F)
Compares two D2D1Matrix3X2F objects. The result specifies whether the values of the two objects are equal.
Declaration
public static bool operator ==(D2D1Matrix3X2F left, D2D1Matrix3X2F right)
Parameters
Type | Name | Description |
---|---|---|
D2D1Matrix3X2F | left | The left D2D1Matrix3X2F to compare. |
D2D1Matrix3X2F | right | The right D2D1Matrix3X2F to compare. |
Returns
Type | Description |
---|---|
bool |
operator !=(D2D1Matrix3X2F, D2D1Matrix3X2F)
Compares two D2D1Matrix3X2F objects. The result specifies whether the values of the two objects are unequal.
Declaration
public static bool operator !=(D2D1Matrix3X2F left, D2D1Matrix3X2F right)
Parameters
Type | Name | Description |
---|---|---|
D2D1Matrix3X2F | left | The left D2D1Matrix3X2F to compare. |
D2D1Matrix3X2F | right | The right D2D1Matrix3X2F to compare. |
Returns
Type | Description |
---|---|
bool |
operator *(D2D1Matrix3X2F, D2D1Matrix3X2F)
Multiplies this matrix with the specified matrix and returns the result.
Declaration
public static D2D1Matrix3X2F operator *(D2D1Matrix3X2F left, D2D1Matrix3X2F right)
Parameters
Type | Name | Description |
---|---|---|
D2D1Matrix3X2F | left | The left matrix. |
D2D1Matrix3X2F | right | The right matrix. |
Returns
Type | Description |
---|---|
D2D1Matrix3X2F | The result matrix |
operator *(D2D1Point2F, D2D1Matrix3X2F)
Uses this matrix to transform the specified point and returns the result.
Declaration
public static D2D1Point2F operator *(D2D1Point2F point, D2D1Matrix3X2F matrix)
Parameters
Type | Name | Description |
---|---|---|
D2D1Point2F | point | The point to transform. |
D2D1Matrix3X2F | matrix | The transform matrix. |
Returns
Type | Description |
---|---|
D2D1Point2F | The result point. |