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.WinControls.Layouts

Assembly:Telerik.WinControls.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:m11float

The matrix element at row 1, column 1.

m12float

The matrix element at row 1, column 2.

m21float

The matrix element at row 2, column 1.

m22float

The matrix element at row 2, column 2.

dxfloat

The X-axis translation component.

dyfloat

The Y-axis translation component.

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

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

The X-axis scale factor.

scaleYfloat

The Y-axis scale factor.

originPointF

The origin point for scaling.

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

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

The X-axis scale factor.

scaleYfloat

The Y-axis scale factor.

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

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

The rotation angle in degrees.

originPointF

The origin point for rotation.

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

C#
public RadMatrix(float angle)
Parameters:anglefloat

The rotation angle in degrees.

Initializes a new RadMatrix, using the elements of the specified GDI+ Matrix instance.

C#
public RadMatrix(Matrix gdiMatrix)
Parameters:gdiMatrixMatrix

The GDI+ Matrix to copy elements from.

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

The point containing the X and Y offset values.

Copy constructor.

C#
public RadMatrix(RadMatrix source)
Parameters:sourceRadMatrix

The source RadMatrix to copy from.

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 float M11
C#
public float M12
C#
public float M21
C#
public 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 void Divide(RadMatrix m)
Parameters:mRadMatrix
C#
public bool Equals(float[] elements)
Parameters:elementsfloat[]Returns:

bool

C#
public bool Equals(Matrix gdiMatrix)
Parameters:gdiMatrixMatrixReturns:

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 Invert()
C#
public void Multiply(RadMatrix m, MatrixOrder order)
Parameters:mRadMatrixorderMatrixOrder
C#
public void Multiply(RadMatrix m)
Parameters:mRadMatrix
C#
public static float PointsDistance(PointF pt1, PointF pt2)
Parameters:pt1PointFpt2PointFReturns:

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 Matrix ToGdiMatrix()
Returns:

Matrix

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 a, RadMatrix b)
Parameters:aRadMatrixbRadMatrixReturns:

bool

C#
public static RadMatrix operator *(RadMatrix a, RadMatrix b)
Parameters:aRadMatrixbRadMatrixReturns:

RadMatrix

C#
public static bool operator ==(RadMatrix a, RadMatrix b)
Parameters:aRadMatrixbRadMatrixReturns:

bool