Matrix Class

Replaces the GDI+ Matrix.
Inheritance Hierarchy
SystemObject
  Aspose.CADMatrix

Namespace:  Aspose.CAD
Assembly:  Aspose.CAD (in Aspose.CAD.dll) Version: 20.8
Syntax
[SerializableAttribute]
public class Matrix

The Matrix type exposes the following members.

Constructors
  NameDescription
Public methodMatrix
Initializes a new instance of the Matrix class as the identity matrix.
Public methodMatrix(Rectangle, Point)
Initializes a new instance of the Matrix class to the geometric transform defined by the specified rectangle and array of points.
Public methodMatrix(RectangleF, PointF)
Initializes a new instance of the Matrix class to the geometric transform defined by the specified rectangle and array of points.
Public methodMatrix(Single, Single, Single, Single, Single, Single)
Initializes a new instance of the Matrix class.
Properties
  NameDescription
Public propertyElements
Gets an array of floating-point values that represents the elements of this Matrix.
Public propertyM11
Gets the matrix element at first row first column. Represents scale along X axis.
Public propertyM12
Gets the matrix element at first row second column. Represents shear along Y axis.
Public propertyM21
Gets the matrix element at second row first column. Represents shear along X axis.
Public propertyM22
Gets the matrix element at second row second column. Represents scale along Y axis.
Public propertyM31
Gets the matrix element at third row first column. Represents translation along X axis.
Public propertyM32
Gets the matrix element at third row first column. Represents translation along Y axis.
Methods
  NameDescription
Public methodEquals(Object)
Determines whether the specified Object is equal to this instance.
(Overrides ObjectEquals(Object).)
Public methodStatic memberEquals(Matrix, Matrix)
Determines whether two matrixes are equal.
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetElements
Gets the copy of matrix elements.
Public methodGetHashCode
Returns a hash code for this instance.
(Overrides ObjectGetHashCode.)
Public methodGetType
Gets the type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodMultiply(Matrix)
Multiplies this Matrix by the matrix specified in the matrix parameter using (default) Prepend order.
Public methodMultiply(Matrix, MatrixOrder)
Multiplies this Matrix by the matrix specified in the matrix parameter, and in the order specified in the order parameter.
Public methodReset
Resets this Matrix to have the elements of the identity matrix.
Public methodRotate(Single)
Applies a clockwise rotation of an amount specified in the angle parameter, around the origin (zero x and y coordinates) for this Matrix in the default (Prepend) order.
Public methodRotate(Single, MatrixOrder)
Applies a clockwise rotation of an amount specified in the angle parameter, around the origin (zero x and y coordinates) for this Matrix in the specified order.
Public methodRotateAt(Single, PointF)
Applies a clockwise rotation about the specified point to this Matrix in the default (Prepend) order.
Public methodRotateAt(Single, PointF, MatrixOrder)
Applies a clockwise rotation about the specified point to this Matrix in the specified order.
Public methodScale(Single, Single)
Applies the specified scale vector (scaleX and scaleY) to this Matrix using (default) Prepend order.
Public methodScale(Single, Single, MatrixOrder)
Applies the specified scale vector (scaleX and scaleY) to this Matrix using the specified order.
Public methodToString
Returns a String that represents this instance.
(Overrides ObjectToString.)
Public methodTransformPoints
Applies the geometric transform represented by this Matrix to a specified array of points.
Public methodTranslate(Single, Single)
Applies the specified translation vector to this Matrix using (default) Prepend order.
Public methodTranslate(Single, Single, MatrixOrder)
Applies the specified translation vector to this Matrix in the specified order.
Operators
  NameDescription
Public operatorStatic memberEquality
Implements the operator ==.
Public operatorStatic memberInequality
Implements the operator !=.
Fields
  NameDescription
Public fieldStatic memberTypeFlip
This flag bit indicates that the transform defined by this object performs a mirror image flip about some axis which changes the normally right handed coordinate system into a left handed system in addition to the conversions indicated by other flag bits. A right handed coordinate system is one where the positive X axis rotates counterclockwise to overlay the positive Y axis similar to the direction that the fingers on your right hand curl when you stare end on at your thumb. A left handed coordinate system is one where the positive X axis rotates clockwise to overlay the positive Y axis similar to the direction that the fingers on your left hand curl. There is no mathematical way to determine the angle of the original flipping or mirroring transformation since all angles of flip are identical given an appropriate adjusting rotation. NOTE: TypeFlip was added after GENERAL_TRANSFORM was in public circulation and the flag bits could no longer be conveniently renumbered without introducing binary incompatibility in outside code.
Public fieldStatic memberTypeGeneralRotation
This flag bit indicates that the transform defined by this object performs a rotation by an arbitrary angle in addition to the conversions indicated by other flag bits. A rotation changes the angles of vectors by the same amount regardless of the original direction of the vector and without changing the length of the vector. This flag bit is mutually exclusive with the
Public fieldStatic memberTypeGeneralScale
A general scale multiplies the length of vectors by different amounts in the x and y directions without changing the angle between perpendicular vectors. This flag bit is mutually exclusive with the TypeUniformScale flag.
Public fieldStatic memberTypeGeneralTransform
This constant indicates that the transform defined by this object performs an arbitrary conversion of the input coordinates. If this transform can be classified by any of the above constants, the type will either be the constant TypeIdentity or a combination of the appropriate flag bits for the various coordinate conversions that this transform performs.
Public fieldStatic memberTypeIdentity
An identity transform is one in which the output coordinates are always the same as the input coordinates. If this transform is anything other than the identity transform, the type will either be the constant GENERAL_TRANSFORM or a combination of the appropriate flag bits for the various coordinate conversions that this transform performs.
Public fieldStatic memberTypeMaskRotation
This constant is a bit mask for any of the rotation flag bits.
Public fieldStatic memberTypeMaskScale
This constant is a bit mask for any of the scale flag bits.
Public fieldStatic memberTypeQuadrantRotation
This flag bit indicates that the transform defined by this object performs a quadrant rotation by some multiple of 90 degrees in addition to the conversions indicated by other flag bits. A rotation changes the angles of vectors by the same amount regardless of the original direction of the vector and without changing the length of the vector. This flag bit is mutually exclusive with the TypeGeneralRotation flag.
Public fieldStatic memberTypeTranslation
A translation moves the coordinates by a constant amount in x and y without changing the length or angle of vectors.
Public fieldStatic memberTypeUniformScale
A uniform scale multiplies the length of vectors by the same amount in both the x and y directions without changing the angle between vectors. This flag bit is mutually exclusive with the TypeGeneralScale flag.
Remarks
Most algorithms taken from Sun's AffineTransform.java. Java's names for matrix elements used internally. Map of java names to .net ones to description: m00 M11 Scale X m10 M12 Shear Y m01 M21 Shear X m11 M22 Scale Y m02 M31 Translate X m12 M32 Translate Y
See Also