Struct Matrix
An affine transformation matrix [a b c d e f] as used by PDF (row vector convention).
public readonly record struct Matrix : IEquatable<Matrix>
- Implements
- Inherited Members
Constructors
Matrix(double, double, double, double, double, double)
An affine transformation matrix [a b c d e f] as used by PDF (row vector convention).
public Matrix(double A, double B, double C, double D, double E, double F)
Parameters
Fields
Identity
The identity matrix [1 0 0 1 0 0].
public static readonly Matrix Identity
Field Value
Properties
A
public double A { get; init; }
Property Value
B
public double B { get; init; }
Property Value
C
public double C { get; init; }
Property Value
D
public double D { get; init; }
Property Value
E
public double E { get; init; }
Property Value
F
public double F { get; init; }
Property Value
Methods
Multiply(Matrix)
Returns this × other (first apply this, then other).
public Matrix Multiply(Matrix other)
Parameters
otherMatrix
Returns
Rotate(double)
Returns a rotation about the origin by degrees (counterclockwise in PDF's y-up space).
public static Matrix Rotate(double degrees)
Parameters
degreesdouble
Returns
Scale(double, double)
Returns a scaling by sx horizontally and sy vertically.
public static Matrix Scale(double sx, double sy)
Parameters
Returns
Transform(double, double)
Applies this matrix to the point (x, y).
public (double X, double Y) Transform(double x, double y)
Parameters
Returns
Translate(double, double)
Returns a translation by (x, y).
public static Matrix Translate(double x, double y)