Matrix

Matrix class

Class represents transformation matrix.

public sealed class Matrix

Constructors

Name Description
Matrix() Constructor creates stanrard 1 to 1 matrix: [ A B C D E F ] = [ 1, 0, 0, 1, 0, 0]
Matrix(double[]) Constructor accepts a matrix with following array representation: [ A B C D E F ]
Matrix(float[]) Constructor accepts a matrix with following array representation: [ A B C D E F ]
Matrix(Matrix) Constructor accepts a matrix to create a copy
Matrix(double, double, double, double, double, double) Initializes transformation matrix with specified coefficients.

Properties

Name Description
A { get; set; } A member of the transformation matrix.
B { get; set; } B member of the transformation matrix.
C { get; set; } C member of the transformation matrix.
D { get; set; } D member of the transformation matrix.
Data { get; } Gets data of Matrix as array.
E { get; set; } E member of the transformation matrix.
Elements { get; } Elements of the matrix.
F { get; set; } F member of the transformation matrix.

Methods

Name Description
static Rotation(double) Creates matrix for given rotation angle.
static Rotation(Rotation) Creates matrix for given rotation.
static Skew(double, double) Creates matrix for given rotation angle.
Add(Matrix) Adds matrix to other matrix.
override Equals(object) Compares matrix agains other object.
override GetHashCode() Hash-code for object.
Multiply(Matrix) Multiplies the matrix by other matrix.
Reverse() Calculates reverse matrix.
override ToString() Returns text reporesentation of the matrix.
Transform(Point) Transforms point using this matrix.
Transform(Rectangle) Transformes rectangle. If angle is not 90 * N degrees then bounding rectangle is returned.
static GetAngle(Rotation) Transaltes rotation into angle (degrees)

See Also