StructMatrix
3x3 affine transform matrix for 2D operations (scale, rotate, skew, translate) used in rendering.
Definition
Namespace:Telerik.Documents.Primitives
Assembly:Telerik.Windows.Documents.Core.dll
Syntax:
public struct Matrix
Constructors
Matrix(double, double, double, double, double, double)
Initializes a new instance of the Matrix struct. m11, m12, 0 m21, m22, 0 offsetX, offsetY, 1
Properties
Determinant
Gets the determinant, which is zero for non-invertible matrices.
HasInverse
Gets a value indicating whether this Matrix is invertible.
Identity
Gets an identity matrix.
IsIdentity
Gets a value indicating whether this Matrix equals the identity transform.
M11
Gets or sets the M11 value.
M12
Gets or sets the M12 value.
M21
Gets or sets the M21 value.
M22
Gets or sets the M22 value.
OffsetX
Gets or sets the translation on the X axis (OffsetX).
Methods
Equals(object)
Determines whether the specified object is equal to the current Matrix.
GetHashCode()
Returns a hash code for the current Matrix.
Declaration
public override int GetHashCode()
Returns
A hash code computed from the matrix elements; returns 0 for the identity matrix.
Overrides
Rotate(double, double, double)
Rotates this Matrix at the given point.
Scale(double, double, double, double)
Scales this Matrix around the origin.
Declaration
public Matrix Scale(double scaleX, double scaleY, double centerX = 0, double centerY = 0)
Parameters
scaleX
The scale factor in the x dimension.
scaleY
The scale factor in the y dimension.
centerX
The centerX of scale. Default 0.
centerY
The centerY of scale. Default 0.
Returns
ScalePrepend(double, double, double, double)
Prepends a scale around the origin to this Matrix.
Declaration
public Matrix ScalePrepend(double scaleX, double scaleY, double centerX = 0, double centerY = 0)
Parameters
scaleX
The scale factor in the x dimension.
scaleY
The scale factor in the y dimension.
centerX
The centerX of scale. Default 0.
centerY
The centerY of scale. Default 0.
Returns
Shear(float, float)
Shears the matrix with the specified scalars.
ShearPrepend(double, double)
Shears the matrix with the specified scalars.
ToString()
Declaration
public override string ToString()
Returns
A string containing the matrix elements in row-major order.
Overrides
Translate(double, double)
Translates this Matrix.
Operators
operator !=(Matrix, Matrix)
Compares two Matrix instances for exact inequality.
operator *(Matrix, Matrix)
Returns a new instance of Matrix that is the result of the multiplication if matrix1 and matrix2.
operator ==(Matrix, Matrix)
Compares two Matrix instances for exact equality.