Class TransformationMatrix
3-by-3 matrix for affine geometric transformation.
Inheritance
System.Object
TransformationMatrix
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Codecrete.SwissQRBill.Generator.Canvas
Assembly: Codecrete.SwissQRBill.Core.dll
Syntax
public class TransformationMatrix
Constructors
| Improve this Doc View SourceTransformationMatrix()
Creates a new identity matrix instance.
Declaration
public TransformationMatrix()
Properties
| Improve this Doc View SourceElements
Matrix elements in row-major order.
As the elements of the third column are always [ 0, 0, 1 ], only the first two columns are returned, i.e. 6 elements.
Declaration
public double[] Elements { get; }
Property Value
Type | Description |
---|---|
System.Double[] |
TranslationX
Gets the horizontal translation.
Declaration
public double TranslationX { get; }
Property Value
Type | Description |
---|---|
System.Double |
TranslationY
Gets the vertical translation.
Declaration
public double TranslationY { get; }
Property Value
Type | Description |
---|---|
System.Double |
Methods
| Improve this Doc View SourceRotate(Double)
Applies a rotation about the origin (prepend).
Declaration
public void Rotate(double angle)
Parameters
Type | Name | Description |
---|---|---|
System.Double | angle | Rotation angle (in radians) |
Scale(Double, Double)
Applies a scaling relative to the origin (prepend).
Declaration
public void Scale(double sx, double sy)
Parameters
Type | Name | Description |
---|---|---|
System.Double | sx | horizontal scaling |
System.Double | sy | vertical scaling |
Translate(Double, Double)
Applies a translation to the matrix (prepend).
Declaration
public void Translate(double dx, double dy)
Parameters
Type | Name | Description |
---|---|---|
System.Double | dx | horizontal translation |
System.Double | dy | vertical translation |