StructRadMatrix
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
RadMatrix(PointF)
Initializes a new RadMatrix, applying the specified X and Y values as DX and DY members of the matrix.
RadMatrix(RadMatrix)
Copy constructor.
RadMatrix(float)
Initializes a new RadMatrix, rotated by the specified angle (in degrees) at origin (0, 0).
RadMatrix(float, PointF)
Initializes a new RadMatrix, rotated by the specified angle (in degrees) at the provided origin.
RadMatrix(float, float)
Initializes a new RadMatrix, scaling it by the provided parameters, at the origin (0, 0).
RadMatrix(float, float, PointF)
Initializes a new RadMatrix, scaling it by the provided parameters, at the specified origin.
Fields
Properties
Determinant
Gets the determinant - [(M11 * M22) - (M12 * M21)] - of this Matrix.
Elements
Gets all the six fields of the matrix as an array.
IsEmpty
Determines whether the current matrix is empty.
IsIdentity
Determines whether this matrix equals to the Identity one.
IsInvertible
Determines whether this matrix may be inverted. That is to have non-zero determinant.
Rotation
Gets the rotation (in degrees) applied to this matrix.
ScaleX
Gets the scale by the X axis, provided by this matrix.
Methods
Equals(float[])
Determines whether the specified array of floating-point values is equal to the current instance of the RadMatrix.
Equals(object)
Determines whether the specified object is equal to the current instance of RadMatrix.
GetHashCode()
Computes the hash code for the current instance of the RadMatrix class.
Declaration
public override int GetHashCode()
Returns
A 32-bit signed integer that represents the hash code of the current RadMatrix instance.
Overrides
Multiply(RadMatrix, MatrixOrder)
Multiplies the current RadMatrix by another RadMatrix using the specified order of multiplication.
Declaration
public void Multiply(RadMatrix matrix, MatrixOrder order)
Parameters
matrix
The RadMatrix to be multiplied with the current matrix.
order
The order in which the multiplication is to be performed.
PointsDistance(PointF, PointF)
Calculates the distance between two points in a 2D space.
Declaration
public static float PointsDistance(PointF point1, PointF point2)
Parameters
point1
The first point represented as a PointF structure.
point2
The second point represented as a PointF structure.
Returns
The distance between the two points as a double value.
Reset()
Resets the matrix to its initial state, clearing any transformations or modifications applied.
Declaration
public void Reset()
Rotate(float)
Rotates the matrix by the specified angle.
Declaration
public void Rotate(float angle)
Parameters
angle
The angle in degrees to rotate the matrix.
Rotate(float, MatrixOrder)
Rotates the matrix by the specified angle.
Declaration
public void Rotate(float angle, MatrixOrder order)
Parameters
angle
The angle in degrees to rotate the matrix.
order
Specifies the order of the transformation, indicating whether to apply the rotation before or after any other transformations.
RotateAt(float, PointF)
Rotates the matrix at the specified angle around a specified point.
RotateAt(float, PointF, MatrixOrder)
Rotates the matrix at a specified angle around a given point, applying the specified order for the transformation.
Declaration
public void RotateAt(float angle, PointF origin, MatrixOrder order)
Parameters
angle
The angle in degrees to rotate the matrix.
origin
The point around which the rotation occurs.
order
The order in which the rotation operation is applied to the matrix.
Scale(float, float)
Scales the matrix by the specified factors along the X and Y axes.
Scale(float, float, MatrixOrder)
Scales the matrix by the specified horizontal and vertical factors in accordance with the provided matrix order.
Declaration
public void Scale(float scaleX, float scaleY, MatrixOrder order)
Parameters
scaleX
The horizontal scaling factor.
scaleY
The vertical scaling factor.
order
The order in which the transformations are applied.
ToString()
Returns a string representation of the current instance of the RadMatrix class.
Declaration
public override string ToString()
Returns
A string that describes the contents and dimensions of the RadMatrix instance.
Overrides
TransformPoint(PointF)
Transforms the specified point using the current transformation matrix.
TransformPoints(PointF[])
Transforms an array of 2D points using the current transformation matrix.
Declaration
public void TransformPoints(PointF[] points)
Parameters
points
PointF[]
An array of PointF structures representing the points to be transformed.
TransformRectangle(RectangleF)
Transforms the specified rectangle using the RadMatrix transformation.
Declaration
public RectangleF TransformRectangle(RectangleF bounds)
Parameters
bounds
The rectangle to be transformed.
Returns
A new RectangleF that represents the transformed rectangle.
Translate(float, float)
Translates the matrix by the specified X and Y offsets.
Translate(float, float, MatrixOrder)
Translates the matrix by the specified x and y offsets according to the given matrix order.
Declaration
public void Translate(float dx, float dy, MatrixOrder order)
Parameters
dx
The amount to translate along the x-axis.
dy
The amount to translate along the y-axis.
order
The order in which the translation is to be applied.