Struct TransformationMatrix
Specifies the conversion from the transformed coordinate space to the original untransformed coordinate space.
public struct TransformationMatrix
- Inherited Members
Constructors
TransformationMatrix(double, double, double, double, double, double, double, double, double)
Create a new TransformationMatrix.
public TransformationMatrix(double a, double b, double r1, double c, double d, double r2, double e, double f, double r3)
Parameters
TransformationMatrix(double[])
Create a new TransformationMatrix.
public TransformationMatrix(double[] value)
Parameters
value
double[]The 9 values of the matrix.
Fields
A
The value at (0, 0) - The scale for the X dimension.
public readonly double A
Field Value
B
The value at (0, 1).
public readonly double B
Field Value
C
The value at (1, 0).
public readonly double C
Field Value
Columns
The number of columns in the matrix.
public const int Columns = 3
Field Value
D
The value at (1, 1) - The scale for the Y dimension.
public readonly double D
Field Value
E
The value at (2, 0) - translation in X.
public readonly double E
Field Value
F
The value at (2, 1) - translation in Y.
public readonly double F
Field Value
Identity
The default TransformationMatrix.
public static TransformationMatrix Identity
Field Value
Rows
The number of rows in the matrix.
public const int Rows = 3
Field Value
Properties
this[int, int]
Get the value at the specific row and column.
public double this[int row, int col] { get; }
Parameters
Property Value
Methods
Equals(object)
public override bool Equals(object obj)
Parameters
obj
object
Returns
Equals(TransformationMatrix, TransformationMatrix)
Determines whether 2 transformation matrices are equal.
public static bool Equals(TransformationMatrix a, TransformationMatrix b)
Parameters
Returns
FromArray(decimal[])
Create a new TransformationMatrix from the values.
public static TransformationMatrix FromArray(decimal[] values)
Parameters
values
decimal[]Either all 9 values of the matrix, 6 values in the default PDF order or the 4 values of the top left square.
Returns
FromArray(double[])
Create a new TransformationMatrix from the values.
public static TransformationMatrix FromArray(double[] values)
Parameters
values
double[]Either all 9 values of the matrix, 6 values in the default PDF order or the 4 values of the top left square.
Returns
FromValues(double, double, double, double)
Create a new TransformationMatrix from the 4 values provided in the default PDF order.
public static TransformationMatrix FromValues(double a, double b, double c, double d)
Parameters
Returns
FromValues(double, double, double, double, double, double)
Create a new TransformationMatrix from the 6 values provided in the default PDF order.
public static TransformationMatrix FromValues(double a, double b, double c, double d, double e, double f)
Parameters
Returns
GetHashCode()
public override int GetHashCode()
Returns
GetRotationMatrix(double)
Create a new TransformationMatrix with the X and Y scaling values set.
public static TransformationMatrix GetRotationMatrix(double degreesCounterclockwise)
Parameters
degreesCounterclockwise
double
Returns
GetScaleMatrix(double, double)
Create a new TransformationMatrix with the X and Y scaling values set.
public static TransformationMatrix GetScaleMatrix(double scaleX, double scaleY)
Parameters
Returns
GetTranslationMatrix(double, double)
Create a new TransformationMatrix with the X and Y translation values set.
public static TransformationMatrix GetTranslationMatrix(double x, double y)
Parameters
Returns
Inverse()
Get the inverse of the current matrix.
public TransformationMatrix Inverse()
Returns
Multiply(double)
Multiplies the matrix by a scalar value without modifying this matrix.
public TransformationMatrix Multiply(double scalar)
Parameters
scalar
doubleThe value to multiply.
Returns
- TransformationMatrix
A new matrix which is multiplied by the scalar value.
Multiply(TransformationMatrix)
Multiplies one transformation matrix by another without modifying either matrix. Order is: (this * matrix).
public TransformationMatrix Multiply(TransformationMatrix matrix)
Parameters
matrix
TransformationMatrixThe matrix to multiply
Returns
- TransformationMatrix
The resulting matrix.
ToString()
public override string ToString()
Returns
Transform(IEnumerable<PdfSubpath>)
Transform a path using this transformation matrix.
public IEnumerable<PdfSubpath> Transform(IEnumerable<PdfSubpath> path)
Parameters
path
IEnumerable<PdfSubpath>The original path.
Returns
- IEnumerable<PdfSubpath>
A new path which is the result of applying this transformation matrix.
Transform(PdfPoint)
Transform a point using this transformation matrix.
public PdfPoint Transform(PdfPoint original)
Parameters
original
PdfPointThe original point.
Returns
- PdfPoint
A new point which is the result of applying this transformation matrix.
Transform(PdfRectangle)
Transform a rectangle using this transformation matrix.
public PdfRectangle Transform(PdfRectangle original)
Parameters
original
PdfRectangleThe original rectangle.
Returns
- PdfRectangle
A new rectangle which is the result of applying this transformation matrix.
Transform(PdfSubpath)
Transform a subpath using this transformation matrix.
public PdfSubpath Transform(PdfSubpath subpath)
Parameters
subpath
PdfSubpathThe original subpath.
Returns
- PdfSubpath
A new subpath which is the result of applying this transformation matrix.
TransformX(double)
Transform an X coordinate using this transformation matrix.
public double TransformX(double x)
Parameters
x
doubleThe X coordinate.
Returns
- double
The transformed X coordinate.
Translate(double, double)
Generate a TransformationMatrix translated by the specified amount.
public TransformationMatrix Translate(double x, double y)