TransformationMatrix Structure

Represents a 3x2 matrix for 2D transformations. It's similar to Matrix3x2; in fact, on platforms where it is available, it uses a Matrix3x2 internally.

Definition

Namespace: KGySoft.Drawing.Shapes
Assembly: KGySoft.Drawing.Core (in KGySoft.Drawing.Core.dll) Version: 9.1.1
C#
[SerializableAttribute]
public struct TransformationMatrix : IEquatable<TransformationMatrix>
Inheritance
Object    ValueType    TransformationMatrix
Implements
IEquatableTransformationMatrix

Constructors

TransformationMatrix(Matrix3x2) Creates a TransformationMatrix instance from the specified Matrix3x2 instance.
TransformationMatrix(Single, Single, Single, Single, Single, Single)Creates a 3x2 matrix from the specified components.

Properties

IsIdentity Gets whether this matrix is the identity matrix.

Methods

CreateRotation(Single) Creates a rotation matrix using the specified angle in radians.
CreateRotation(Single, PointF) Creates a rotation matrix using the specified angle and center point.
CreateRotationDegrees(Single) Creates a rotation matrix using the specified angle in degrees.
CreateRotationDegrees(Single, PointF) Creates a rotation matrix using the specified angle and center point.
CreateScale Creates a scale matrix from the specified x and y components.
CreateTranslation Creates a translation matrix from the specified offsets.
Equals(Object) Returns a boolean indicating whether the given Object is equal to this matrix instance.
(Overrides ValueTypeEquals(Object))
Equals(TransformationMatrix) Returns a boolean indicating whether the matrix is equal to the other given matrix.
GetHashCode Returns the hash code for this instance.
(Overrides ValueTypeGetHashCode)
ToString Returns a string that represents this matrix.
(Overrides ValueTypeToString)

Operators

Addition(TransformationMatrix, TransformationMatrix) Adds each matrix element in a with its corresponding element in b.
Equality(TransformationMatrix, TransformationMatrix) Returns a boolean indicating whether the given matrices are equal.
Inequality(TransformationMatrix, TransformationMatrix) Returns a boolean indicating whether the given matrices are not equal.
Multiply(TransformationMatrix, TransformationMatrix) Multiplies two matrices together and returns the resulting matrix.
Multiply(TransformationMatrix, Single) Scales all elements in a matrix by the given scalar factor.
Subtraction(TransformationMatrix, TransformationMatrix) Subtracts each matrix element in b from its corresponding element in a.
UnaryNegation(TransformationMatrix) Negates the given matrix by multiplying all values by -1.

Fields

Identity Gets the identity matrix. This field is read-only.
M11The first element of the first row.
M12The second element of the first row.
M21The first element of the second row.
M22The second element of the second row.
M31The first element of the third row.
M32The second element of the third row.

See Also