Namespace: PdfSharp.Drawing
Represents a 3-by-3 matrix that represents an affine 2D transformation.
public struct XMatrix
Inheritance Object → ValueType → XMatrix
Implements IFormattable
Gets the identity matrix.
public static XMatrix Identity { get; }
Gets a value indicating whether this matrix instance is the identity matrix.
public bool IsIdentity { get; }
Gets the determinant of this matrix.
public double Determinant { get; }
Gets a value that indicates whether this matrix is invertible.
public bool HasInverse { get; }
Gets or sets the value of the first row and first column of this matrix.
public double M11 { get; set; }
Gets or sets the value of the first row and second column of this matrix.
public double M12 { get; set; }
Gets or sets the value of the second row and first column of this matrix.
public double M21 { get; set; }
Gets or sets the value of the second row and second column of this matrix.
public double M22 { get; set; }
Gets or sets the value of the third row and first column of this matrix.
public double OffsetX { get; set; }
Gets or sets the value of the third row and second column of this matrix.
public double OffsetY { get; set; }
Initializes a new instance of the XMatrix struct.
XMatrix(double m11, double m12, double m21, double m22, double offsetX, double offsetY)
m11
Double
m12
Double
m21
Double
m22
Double
offsetX
Double
offsetY
Double
XMatrix CreateScaling(double scaleX, double scaleY)
scaleX
Double
scaleY
Double
XMatrix CreateScaling(double scaleX, double scaleY, double centerX, double centerY)
scaleX
Double
scaleY
Double
centerX
Double
centerY
Double
XMatrix CreateSkewRadians(double skewX, double skewY, double centerX, double centerY)
skewX
Double
skewY
Double
centerX
Double
centerY
Double
XMatrix CreateSkewRadians(double skewX, double skewY)
skewX
Double
skewY
Double
Sets this matrix into an identity matrix.
void SetIdentity()
Gets an array of double values that represents the elements of this matrix.
Double[] GetElements()
Multiplies two matrices.
XMatrix Multiply(XMatrix trans1, XMatrix trans2)
trans1
XMatrix
trans2
XMatrix
Appends the specified matrix to this matrix.
void Append(XMatrix matrix)
matrix
XMatrix
Prepends the specified matrix to this matrix.
void Prepend(XMatrix matrix)
matrix
XMatrix
Use Append.
Appends the specified matrix to this matrix.
void Multiply(XMatrix matrix)
matrix
XMatrix
Use Prepend.
Prepends the specified matrix to this matrix.
void MultiplyPrepend(XMatrix matrix)
matrix
XMatrix
Multiplies this matrix with the specified matrix.
void Multiply(XMatrix matrix, XMatrixOrder order)
matrix
XMatrix
order
XMatrixOrder
Use TranslateAppend or TranslatePrepend explicitly, because in GDI+ and WPF the defaults are contrary.
Appends a translation of the specified offsets to this matrix.
void Translate(double offsetX, double offsetY)
offsetX
Double
offsetY
Double
Appends a translation of the specified offsets to this matrix.
void TranslateAppend(double offsetX, double offsetY)
offsetX
Double
offsetY
Double
Prepends a translation of the specified offsets to this matrix.
void TranslatePrepend(double offsetX, double offsetY)
offsetX
Double
offsetY
Double
Translates the matrix with the specified offsets.
void Translate(double offsetX, double offsetY, XMatrixOrder order)
offsetX
Double
offsetY
Double
order
XMatrixOrder
Use ScaleAppend or ScalePrepend explicitly, because in GDI+ and WPF the defaults are contrary.
Appends the specified scale vector to this matrix.
void Scale(double scaleX, double scaleY)
scaleX
Double
scaleY
Double
Appends the specified scale vector to this matrix.
void ScaleAppend(double scaleX, double scaleY)
scaleX
Double
scaleY
Double
Prepends the specified scale vector to this matrix.
void ScalePrepend(double scaleX, double scaleY)
scaleX
Double
scaleY
Double
Scales the matrix with the specified scalars.
void Scale(double scaleX, double scaleY, XMatrixOrder order)
scaleX
Double
scaleY
Double
order
XMatrixOrder
Use ScaleAppend or ScalePrepend explicitly, because in GDI+ and WPF the defaults are contrary.
Scales the matrix with the specified scalar.
void Scale(double scaleXY)
scaleXY
Double
Appends the specified scale vector to this matrix.
void ScaleAppend(double scaleXY)
scaleXY
Double
Prepends the specified scale vector to this matrix.
void ScalePrepend(double scaleXY)
scaleXY
Double
Scales the matrix with the specified scalar.
void Scale(double scaleXY, XMatrixOrder order)
scaleXY
Double
order
XMatrixOrder
Use ScaleAtAppend or ScaleAtPrepend explicitly, because in GDI+ and WPF the defaults are contrary.
Function is obsolete.
void ScaleAt(double scaleX, double scaleY, double centerX, double centerY)
scaleX
Double
scaleY
Double
centerX
Double
centerY
Double
Appends the specified scale about the specified point of this matrix.
void ScaleAtAppend(double scaleX, double scaleY, double centerX, double centerY)
scaleX
Double
scaleY
Double
centerX
Double
centerY
Double
Prepends the specified scale about the specified point of this matrix.
void ScaleAtPrepend(double scaleX, double scaleY, double centerX, double centerY)
scaleX
Double
scaleY
Double
centerX
Double
centerY
Double
Use RotateAppend or RotatePrepend explicitly, because in GDI+ and WPF the defaults are contrary.
Function is obsolete.
void Rotate(double angle)
angle
Double
Appends a rotation of the specified angle to this matrix.
void RotateAppend(double angle)
angle
Double
Prepends a rotation of the specified angle to this matrix.
void RotatePrepend(double angle)
angle
Double
Rotates the matrix with the specified angle.
void Rotate(double angle, XMatrixOrder order)
angle
Double
order
XMatrixOrder
Use RotateAtAppend or RotateAtPrepend explicitly, because in GDI+ and WPF the defaults are contrary.
Function is obsolete.
void RotateAt(double angle, double centerX, double centerY)
angle
Double
centerX
Double
centerY
Double
Appends a rotation of the specified angle at the specified point to this matrix.
void RotateAtAppend(double angle, double centerX, double centerY)
angle
Double
centerX
Double
centerY
Double
Prepends a rotation of the specified angle at the specified point to this matrix.
void RotateAtPrepend(double angle, double centerX, double centerY)
angle
Double
centerX
Double
centerY
Double
Use RotateAtAppend or RotateAtPrepend explicitly, because in GDI+ and WPF the defaults are contrary.
Rotates the matrix with the specified angle at the specified point.
void RotateAt(double angle, XPoint point)
angle
Double
point
XPoint
Appends a rotation of the specified angle at the specified point to this matrix.
void RotateAtAppend(double angle, XPoint point)
angle
Double
point
XPoint
Prepends a rotation of the specified angle at the specified point to this matrix.
void RotateAtPrepend(double angle, XPoint point)
angle
Double
point
XPoint
Rotates the matrix with the specified angle at the specified point.
void RotateAt(double angle, XPoint point, XMatrixOrder order)
angle
Double
point
XPoint
order
XMatrixOrder
Use ShearAppend or ShearPrepend explicitly, because in GDI+ and WPF the defaults are contrary.
Function is obsolete.
void Shear(double shearX, double shearY)
shearX
Double
shearY
Double
Appends a skew of the specified degrees in the x and y dimensions to this matrix.
void ShearAppend(double shearX, double shearY)
shearX
Double
shearY
Double
Prepends a skew of the specified degrees in the x and y dimensions to this matrix.
void ShearPrepend(double shearX, double shearY)
shearX
Double
shearY
Double
Shears the matrix with the specified scalars.
void Shear(double shearX, double shearY, XMatrixOrder order)
shearX
Double
shearY
Double
order
XMatrixOrder
Use SkewAppend or SkewPrepend explicitly, because in GDI+ and WPF the defaults are contrary.
Function is obsolete.
void Skew(double skewX, double skewY)
skewX
Double
skewY
Double
Appends a skew of the specified degrees in the x and y dimensions to this matrix.
void SkewAppend(double skewX, double skewY)
skewX
Double
skewY
Double
Prepends a skew of the specified degrees in the x and y dimensions to this matrix.
void SkewPrepend(double skewX, double skewY)
skewX
Double
skewY
Double
Transforms the specified point by this matrix and returns the result.
XPoint Transform(XPoint point)
point
XPoint
Transforms the specified points by this matrix.
void Transform(XPoint[] points)
points
XPoint[]
Multiplies all points of the specified array with this matrix.
void TransformPoints(XPoint[] points)
points
XPoint[]
Transforms the specified vector by this Matrix and returns the result.
XVector Transform(XVector vector)
vector
XVector
Transforms the specified vectors by this matrix.
void Transform(XVector[] vectors)
vectors
XVector[]
Inverts the matrix.
void Invert()
Determines whether the two matrices are equal.
bool Equals(XMatrix matrix1, XMatrix matrix2)
matrix1
XMatrix
matrix2
XMatrix
Determines whether this matrix is equal to the specified object.
bool Equals(object o)
o
Object
Determines whether this matrix is equal to the specified matrix.
bool Equals(XMatrix value)
value
XMatrix
Returns the hash code for this instance.
int GetHashCode()
Parses a matrix from a string.
XMatrix Parse(string source)
source
String
Converts this XMatrix to a human readable string.
string ToString()
Converts this XMatrix to a human readable string.
string ToString(IFormatProvider provider)
provider
IFormatProvider
string ConvertToString(string format, IFormatProvider provider)
format
String
provider
IFormatProvider
void MultiplyVector(Double& x, Double& y)
x
Double&
y
Double&
void MultiplyPoint(Double& x, Double& y)
x
Double&
y
Double&
XMatrix CreateTranslation(double offsetX, double offsetY)
offsetX
Double
offsetY
Double
XMatrix CreateRotationRadians(double angle)
angle
Double
XMatrix CreateRotationRadians(double angle, double centerX, double centerY)
angle
Double
centerX
Double
centerY
Double