RadMatrix
Represents a light-weight 3*3 Matrix to be used for GDI+ transformations.
Definition
Namespace:Telerik.Windows.Documents.Layout
Assembly:Telerik.Windows.Controls.RichTextBox.dll
Syntax:
public struct RadMatrix
Constructors
Initializes a new RadMatrix, rotated by the specified angle (in degrees) at origin (0, 0).
Initializes a new RadMatrix, applying the specified X and Y values as DX and DY members of the matrix.
Copy constructor.
Fields
public const float DegreeToRadian = 0.017453294
public const float RadianToDegree = 57.295773
Properties
Gets the determinant - [(M11 * M22) - (M12 * M21)] - of this Matrix.
public float Determinant { get; }
Gets all the six fields of the matrix as an array.
public float[] Elements { get; }
Determines whether this matrix equals to the Identity one.
public bool IsIdentity { get; }
Determines whether this matrix may be inverted. That is to have non-zero determinant.
public bool IsInvertible { get; }
Gets the rotation (in degrees) applied to this matrix.
public float Rotation { get; }
Methods
Determines whether the specified array of floating-point values is equal to the current instance of the RadMatrix.
Determines whether the specified object is equal to the current instance of RadMatrix.
Computes the hash code for the current instance of the RadMatrix class.
public override int GetHashCode()
A 32-bit signed integer that represents the hash code of the current RadMatrix instance.
Overrides:
Multiplies the current RadMatrix by another RadMatrix using the specified order of multiplication.
public void Multiply(RadMatrix matrix, MatrixOrder order)
The RadMatrix to be multiplied with the current matrix.
orderMatrixOrderThe order in which the multiplication is to be performed.
Calculates the distance between two points in a 2D space.
Resets the matrix to its initial state, clearing any transformations or modifications applied.
public void Reset()
Rotates the matrix by the specified angle.
public void Rotate(float angle, MatrixOrder order)
The angle in degrees to rotate the matrix.
orderMatrixOrderSpecifies the order of the transformation, indicating whether to apply the rotation before or after any other transformations.
Rotates the matrix by the specified angle.
Rotates the matrix at a specified angle around a given point, applying the specified order for the transformation.
public void RotateAt(float angle, PointF origin, MatrixOrder order)
The angle in degrees to rotate the matrix.
originPointFThe point around which the rotation occurs.
orderMatrixOrderThe order in which the rotation operation is applied to the matrix.
Scales the matrix by the specified horizontal and vertical factors in accordance with the provided matrix order.
public void Scale(float scaleX, float scaleY, MatrixOrder order)
The horizontal scaling factor.
scaleYfloatThe vertical scaling factor.
orderMatrixOrderThe order in which the transformations are applied.
Returns a string representation of the current instance of the RadMatrix class.
public override string ToString()
A string that describes the contents and dimensions of the RadMatrix instance.
Overrides:
Transforms an array of 2D points using the current transformation matrix.
public void TransformPoints(PointF[] points)
An array of PointF structures representing the points to be transformed.
Transforms the specified rectangle using the RadMatrix transformation.
public RectangleF TransformRectangle(RectangleF bounds)
The rectangle to be transformed.
Returns:A new RectangleF that represents the transformed rectangle.
Translates the matrix by the specified x and y offsets according to the given matrix order.
public void Translate(float dx, float dy, MatrixOrder order)
The amount to translate along the x-axis.
dyfloatThe amount to translate along the y-axis.
orderMatrixOrderThe order in which the translation is to be applied.