Struct Matrix
Represents a Matrix structure.
Inherited Members
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
Declaration
public Matrix(double m11, double m12, double m21, double m22, double offsetX, double offsetY)
Parameters
System.Double
m11
|
System.Double
m12
|
System.Double
m21
|
System.Double
m22
|
System.Double
offsetX
|
System.Double
offsetY
|
Properties
Determinant
Gets the determinant.
Declaration
public double Determinant { get; }
Property Value
System.Double
|
HasInverse
Determines whether the specified Matrix has inverse.
Declaration
public bool HasInverse { get; }
Property Value
System.Boolean
|
Identity
IsIdentity
Gets a value indicating whether this Matrix is equal to the identity matrix.
Declaration
public bool IsIdentity { get; }
Property Value
System.Boolean
|
M11
Gets or sets the M11 value.
Declaration
public double M11 { get; set; }
Property Value
System.Double
|
M12
Gets or sets the M12 value.
Declaration
public double M12 { get; set; }
Property Value
System.Double
|
M21
Gets or sets the M21 value.
Declaration
public double M21 { get; set; }
Property Value
System.Double
|
M22
Gets or sets the M22 value.
Declaration
public double M22 { get; set; }
Property Value
System.Double
|
OffsetX
Gets or sets the OffsetX value.
Declaration
public double OffsetX { get; set; }
Property Value
System.Double
|
OffsetY
Gets or sets the OffsetY value.
Declaration
public double OffsetY { get; set; }
Property Value
System.Double
|
Methods
Equals(Object)
Declaration
public override bool Equals(object obj)
Parameters
System.Object
obj
|
Returns
System.Boolean
|
Overrides
GetHashCode()
Declaration
public override int GetHashCode()
Returns
System.Int32
|
Overrides
Rotate(Double, Double, Double)
Rotates this Matrix at the given point.
Declaration
public Matrix Rotate(double angle, double centerX = 0, double centerY = 0)
Parameters
System.Double
angle
The angle to rotate. |
System.Double
centerX
The centerX of rotation. Default 0. |
System.Double
centerY
The centerY of rotation. Default 0. |
Returns
Matrix
|
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
System.Double
scaleX
The scale factor in the x dimension. |
System.Double
scaleY
The scale factor in the y dimension. |
System.Double
centerX
The centerX of scale. Default 0. |
System.Double
centerY
The centerY of scale. Default 0. |
Returns
Matrix
|
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
System.Double
scaleX
The scale factor in the x dimension. |
System.Double
scaleY
The scale factor in the y dimension. |
System.Double
centerX
The centerX of scale. Default 0. |
System.Double
centerY
The centerY of scale. Default 0. |
Returns
Matrix
|
Shear(Single, Single)
Shears the matrix with the specified scalars.
Declaration
public void Shear(float shearX, float shearY)
Parameters
System.Single
shearX
|
System.Single
shearY
|
ShearPrepend(Double, Double)
Shears the matrix with the specified scalars.
Declaration
public void ShearPrepend(double shearX, double shearY)
Parameters
System.Double
shearX
|
System.Double
shearY
|
ToString()
Declaration
public override string ToString()
Returns
System.String
|
Overrides
Translate(Double, Double)
Translates this Matrix.
Declaration
public Matrix Translate(double offsetX, double offsetY)
Parameters
System.Double
offsetX
The offset in the x dimension. |
System.Double
offsetY
The offset in the y dimension. |
Returns
Matrix
|
Operators
Equality(Matrix, Matrix)
Compares two Matrix instances for exact equality.
Declaration
public static bool operator ==(Matrix a, Matrix b)
Parameters
Matrix
a
The first Matrix to compare. |
Matrix
b
The second Matrix to compare. |
Returns
System.Boolean
True if the two Matrixs are exactly equal; otherwise false. |
Inequality(Matrix, Matrix)
Compares two Matrix instances for exact inequality.
Declaration
public static bool operator !=(Matrix a, Matrix b)
Parameters
Matrix
a
The first Matrix to compare. |
Matrix
b
The second Matrix to compare. |
Returns
System.Boolean
True if the two Matrixs are exactly unequal; otherwise false. |
Multiply(Matrix, Matrix)
Returns a new instance of Matrix that is the result of the multiplication if matrix1 and matrix2.
Declaration
public static Matrix operator *(Matrix matrix1, Matrix matrix2)
Parameters
Matrix
matrix1
The left matrix to multiply. |
Matrix
matrix2
The right matrix to multiply. |
Returns
Matrix
|