Click or drag to resize

MatrixD2D Class

Represents a 2D transformation matrix.
Inheritance Hierarchy
SystemObject
  Altaxo.GeometryMatrixD2D

Namespace: Altaxo.Geometry
Assembly: AltaxoCore (in AltaxoCore.dll) Version: 4.8.3448.0 (4.8.3448.0)
Syntax
C#
[SerializableAttribute]
public class MatrixD2D : ICloneable

The MatrixD2D type exposes the following members.

Constructors
 NameDescription
Public methodMatrixD2D Initializes a new instance of the MatrixD2D class.
Public methodMatrixD2D(MatrixD2D) Initializes a new instance of the MatrixD2D class by copying another matrix.
Public methodMatrixD2D(Double, Double, Double, Double, Double, Double) Initializes a new instance of the MatrixD2D class with specified elements.
Top
Properties
 NameDescription
Public propertyDeterminantGets the determinant of the matrix.
Public propertyDXGets the translation X element.
Public propertyDYGets the translation Y element.
Public propertyElements Gets the elements of the matrix as an array.
Public propertyRotation Gets the rotation angle in degrees.
Public propertyRXGets the rotation X element.
Public propertyRYGets the rotation Y element.
Public propertyScaleX Gets the scale X value.
Public propertyScaleY Gets the scale Y value.
Public propertyShear Gets the shear value.
Public propertySXGets the scale X element.
Public propertySYGets the scale Y element.
Public propertyX Gets the translation X value.
Public propertyY Gets the translation Y value.
Top
Methods
 NameDescription
Public methodAppendInverseTransform Appends the inverse of a transformation to the matrix.
Public methodAppendTransform(MatrixD2D) Appends a transformation to the matrix using another MatrixD2D.
Public methodAppendTransform(Double, Double, Double, Double, Double, Double) Appends a transformation to the matrix using specified elements.
Public methodClone Creates a shallow copy of this matrix.
Public methodCopyFrom(MatrixD2D) Copies the elements from another MatrixD2D instance.
Public methodCopyFrom(Object) Copies the elements from another object if it is a MatrixD2D.
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Public methodInverse Gets the inverse of the matrix.
Public methodInverseTransformPoint(PointD2D) Inverse transforms a point using this matrix.
Public methodInverseTransformPoint(Double, Double) Inverse transforms a point using this matrix.
Public methodInverseTransformVector(PointD2D) Inverse transforms a vector using this matrix.
Public methodInverseTransformVector(Double, Double) Inverse transforms a vector using this matrix.
Protected methodMemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
Public methodPrependInverseTransform Prepends the inverse of a transformation to the matrix.
Public methodPrependTransform(MatrixD2D) Prepends a transformation to the matrix using another MatrixD2D.
Public methodPrependTransform(Double, Double, Double, Double, Double, Double) Prepends a transformation to the matrix using specified elements.
Public methodReset Resets the matrix to the identity transformation.
Public methodRotateAppend Appends a rotation transformation to the matrix.
Public methodRotatePrepend Prepends a rotation transformation to the matrix.
Public methodScaleAppend Appends a scale transformation to the matrix.
Public methodScalePrepend Prepends a scale transformation to the matrix.
Public methodSetElements Sets the elements of the matrix.
Public methodSetTranslationRotationShearxScale Sets the matrix using translation, rotation, shear, and scale values.
Public methodShearAppend Appends a shear transformation to the matrix.
Public methodShearPrepend Prepends a shear transformation to the matrix.
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Public methodTransformPoint(PointD2D) Transforms a point using this matrix.
Public methodTransformPoint(Double, Double) Transforms a point using this matrix.
Public methodTransformVector(PointD2D) Transforms a vector using this matrix (ignores translation).
Public methodTransformVector(Double, Double) Transforms a vector using this matrix (ignores translation).
Public methodTranslateAppend Appends a translation to the matrix.
Public methodTranslatePrepend Prepends a translation to the matrix.
Top
Extension Methods
Remarks
The following transformation is represented by this matrix:
C#
            |sx, ry, 0|
|x, y, 1| * |rx, sy, 0| = |x', y', 1|
            |dx, dy, 1|
where (x,y) are the world coordinates, and (x', y') are the page coordinates.

An alternative interpretation of this matrix is a rhombus, where the absolute coordinate of its origin is given by (dx, dy), and which is spanned by the two basis vectors (sx,ry) and (rx, sy). By inverse transformation of a given point one gets the coordinates inside this rhombus in terms of the spanning vectors.

See Also