New to Telerik UI for WinFormsStart a free 30-day trial

RadMatrix

Struct

Represents a light-weight 3*3 Matrix to be used for GDI+ transformations.

Definition

Namespace:Telerik.WinForms.Documents.Layout

Assembly:Telerik.WinControls.RichTextEditor.dll

Syntax:

C#
public struct RadMatrix

Constructors

Initializes a new RadMatrix, using the specified parameters.

C#
public RadMatrix(float m11, float m12, float m21, float m22, float dx, float dy)
Parameters:m11floatm12floatm21floatm22floatdxfloatdyfloat

Initializes a new RadMatrix, scaling it by the provided parameters, at the specified origin.

C#
public RadMatrix(float scaleX, float scaleY, PointF origin)
Parameters:scaleXfloatscaleYfloatoriginPointF

Initializes a new RadMatrix, scaling it by the provided parameters, at the origin (0, 0).

C#
public RadMatrix(float scaleX, float scaleY)
Parameters:scaleXfloatscaleYfloat

Initializes a new RadMatrix, rotated by the specified angle (in degrees) at the provided origin.

C#
public RadMatrix(float angle, PointF origin)
Parameters:anglefloatoriginPointF

Initializes a new RadMatrix, rotated by the specified angle (in degrees) at origin (0, 0).

C#
public RadMatrix(float angle)
Parameters:anglefloat

Initializes a new RadMatrix, applying the specified X and Y values as DX and DY members of the matrix.

C#
public RadMatrix(PointF offset)
Parameters:offsetPointF

Copy constructor.

C#
public RadMatrix(RadMatrix source)
Parameters:sourceRadMatrix

Fields

C#
public const float DegreeToRadian = 0.017453294
C#
public float DX
C#
public float DY
C#
public static readonly RadMatrix Empty
C#
public static readonly RadMatrix Identity
C#
public static readonly float M11
C#
public static readonly float M12
C#
public static readonly float M21
C#
public static readonly float M22
C#
public const float PI = 3.141593
C#
public const float RadianToDegree = 57.295773
C#
public const float TwoPI = 6.283186

Properties

Gets the determinant - [(M11 * M22) - (M12 * M21)] - of this Matrix.

C#
public float Determinant { get; }

Gets all the six fields of the matrix as an array.

C#
public float[] Elements { get; }

Determines whether the current matrix is empty.

C#
public bool IsEmpty { get; }

Determines whether this matrix equals to the Identity one.

C#
public bool IsIdentity { get; }

Determines whether this matrix may be inverted. That is to have non-zero determinant.

C#
public bool IsInvertible { get; }

Gets the rotation (in degrees) applied to this matrix.

C#
public float Rotation { get; }

Gets the scale by the X axis, provided by this matrix.

C#
public float ScaleX { get; }

Gets the scale by the Y axis, provided by this matrix.

C#
public float ScaleY { get; }

Methods

C#
public bool Equals(float[] elements)
Parameters:elementsfloat[]Returns:

bool

C#
public override bool Equals(object obj)
Parameters:objobjectReturns:

bool

Overrides: ValueType.Equals(object)

C#
public override int GetHashCode()
Returns:

int

Overrides: ValueType.GetHashCode()

C#
public void Multiply(RadMatrix matrix, MatrixOrder order)
Parameters:matrixRadMatrixorderMatrixOrder
C#
public void Multiply(RadMatrix matrix)
Parameters:matrixRadMatrix
C#
public static float PointsDistance(PointF point1, PointF point2)
Parameters:point1PointFpoint2PointFReturns:

float

C#
public void Reset()
C#
public void Rotate(float angle, MatrixOrder order)
Parameters:anglefloatorderMatrixOrder
C#
public void Rotate(float angle)
Parameters:anglefloat
C#
public void RotateAt(float angle, PointF origin, MatrixOrder order)
Parameters:anglefloatoriginPointForderMatrixOrder
C#
public void RotateAt(float angle, PointF origin)
Parameters:anglefloatoriginPointF
C#
public void Scale(float scaleX, float scaleY, MatrixOrder order)
Parameters:scaleXfloatscaleYfloatorderMatrixOrder
C#
public void Scale(float scaleX, float scaleY)
Parameters:scaleXfloatscaleYfloat
C#
public override string ToString()
Returns:

string

Overrides: ValueType.ToString()

C#
public PointF TransformPoint(PointF point)
Parameters:pointPointFReturns:

PointF

C#
public void TransformPoints(PointF[] points)
Parameters:pointsPointF[]
C#
public RectangleF TransformRectangle(RectangleF bounds)
Parameters:boundsRectangleFReturns:

RectangleF

C#
public void Translate(float dx, float dy, MatrixOrder order)
Parameters:dxfloatdyfloatorderMatrixOrder
C#
public void Translate(float dx, float dy)
Parameters:dxfloatdyfloat

Operators

C#
public static bool operator !=(RadMatrix matrix1, RadMatrix matrix2)
Parameters:matrix1RadMatrixmatrix2RadMatrixReturns:

bool

C#
public static RadMatrix operator *(RadMatrix matrix1, RadMatrix matrix2)
Parameters:matrix1RadMatrixmatrix2RadMatrixReturns:

RadMatrix

C#
public static bool operator ==(RadMatrix matrix1, RadMatrix matrix2)
Parameters:matrix1RadMatrixmatrix2RadMatrixReturns:

bool