PdfSharp-GDI  1.31.7289
PdfSharp.Drawing.XMatrix Struct Reference

Represents a 3-by-3 matrix that represents an affine 2D transformation. More...

Inheritance diagram for PdfSharp.Drawing.XMatrix:

Classes

class  MatrixHelper
 Internal matrix helper.
 

Public Member Functions

 XMatrix (double m11, double m12, double m21, double m22, double offsetX, double offsetY)
 Initializes a new instance of the XMatrix struct. More...
 
void SetIdentity ()
 Sets this matrix into an identity matrix. More...
 
void InitIdentity ()
 Fixes a bug that XMatrixTypes.Identity is not handled correctly in some cases. More...
 
double[] GetElements ()
 Gets an array of double values that represents the elements of this matrix. More...
 
void Append (XMatrix matrix)
 Appends the specified matrix to this matrix. More...
 
void Prepend (XMatrix matrix)
 Prepends the specified matrix to this matrix. More...
 
void Multiply (XMatrix matrix)
 Appends the specified matrix to this matrix. More...
 
void MultiplyPrepend (XMatrix matrix)
 Prepends the specified matrix to this matrix. More...
 
void Multiply (XMatrix matrix, XMatrixOrder order)
 Multiplies this matrix with the specified matrix. More...
 
void Translate (double offsetX, double offsetY)
 Appends a translation of the specified offsets to this matrix. More...
 
void TranslateAppend (double offsetX, double offsetY)
 Appends a translation of the specified offsets to this matrix. More...
 
void TranslatePrepend (double offsetX, double offsetY)
 Prepends a translation of the specified offsets to this matrix. More...
 
void Translate (double offsetX, double offsetY, XMatrixOrder order)
 Translates the matrix with the specified offsets. More...
 
void Scale (double scaleX, double scaleY)
 Appends the specified scale vector to this matrix. More...
 
void ScaleAppend (double scaleX, double scaleY)
 Appends the specified scale vector to this matrix. More...
 
void ScalePrepend (double scaleX, double scaleY)
 Prepends the specified scale vector to this matrix. More...
 
void Scale (double scaleX, double scaleY, XMatrixOrder order)
 Scales the matrix with the specified scalars. More...
 
void Scale (double scaleXY)
 Scales the matrix with the specified scalar. More...
 
void ScaleAppend (double scaleXY)
 Appends the specified scale vector to this matrix. More...
 
void ScalePrepend (double scaleXY)
 Prepends the specified scale vector to this matrix. More...
 
void Scale (double scaleXY, XMatrixOrder order)
 Scales the matrix with the specified scalar. More...
 
void ScaleAt (double scaleX, double scaleY, double centerX, double centerY)
 Function is obsolete. More...
 
void ScaleAtAppend (double scaleX, double scaleY, double centerX, double centerY)
 Apppends the specified scale about the specified point of this matrix. More...
 
void ScaleAtPrepend (double scaleX, double scaleY, double centerX, double centerY)
 Prepends the specified scale about the specified point of this matrix. More...
 
void Rotate (double angle)
 Function is obsolete. More...
 
void RotateAppend (double angle)
 Appends a rotation of the specified angle to this matrix. More...
 
void RotatePrepend (double angle)
 Prepends a rotation of the specified angle to this matrix. More...
 
void Rotate (double angle, XMatrixOrder order)
 Rotates the matrix with the specified angle. More...
 
void RotateAt (double angle, double centerX, double centerY)
 Function is obsolete. More...
 
void RotateAtAppend (double angle, double centerX, double centerY)
 Appends a rotation of the specified angle at the specified point to this matrix. More...
 
void RotateAtPrepend (double angle, double centerX, double centerY)
 Prepends a rotation of the specified angle at the specified point to this matrix. More...
 
void RotateAt (double angle, XPoint point)
 Rotates the matrix with the specified angle at the specified point. More...
 
void RotateAtAppend (double angle, XPoint point)
 Appends a rotation of the specified angle at the specified point to this matrix. More...
 
void RotateAtPrepend (double angle, XPoint point)
 Prepends a rotation of the specified angle at the specified point to this matrix. More...
 
void RotateAt (double angle, XPoint point, XMatrixOrder order)
 Rotates the matrix with the specified angle at the specified point. More...
 
void Shear (double shearX, double shearY)
 Function is obsolete. More...
 
void ShearAppend (double shearX, double shearY)
 Appends a skew of the specified degrees in the x and y dimensions to this matrix. More...
 
void ShearPrepend (double shearX, double shearY)
 Prepends a skew of the specified degrees in the x and y dimensions to this matrix. More...
 
void Shear (double shearX, double shearY, XMatrixOrder order)
 Shears the matrix with the specified scalars. More...
 
void Skew (double skewX, double skewY)
 Function is obsolete. More...
 
void SkewAppend (double skewX, double skewY)
 Appends a skew of the specified degrees in the x and y dimensions to this matrix. More...
 
void SkewPrepend (double skewX, double skewY)
 Prepends a skew of the specified degrees in the x and y dimensions to this matrix. More...
 
XPoint Transform (XPoint point)
 Transforms the specified point by this matrix and returns the result. More...
 
void Transform (XPoint[] points)
 Transforms the specified points by this matrix. More...
 
void TransformPoints (XPoint[] points)
 Multiplies all points of the specified array with the this matrix. More...
 
void TransformPoints (System.Drawing.Point[] points)
 Multiplies all points of the specified array with the this matrix. More...
 
XVector Transform (XVector vector)
 Transforms the specified vector by this Matrix and returns the result. More...
 
void Transform (XVector[] vectors)
 Transforms the specified vectors by this matrix. More...
 
void TransformVectors (PointF[] points)
 Multiplies all vectors of the specified array with the this matrix. The translation elements of this matrix (third row) are ignored. More...
 
void Invert ()
 Inverts the matrix. More...
 
System.Drawing.Drawing2D.Matrix ToGdiMatrix ()
 Converts this matrix to a System.Drawing.Drawing2D.Matrix object. More...
 
System.Drawing.Drawing2D.Matrix ToGdipMatrix ()
 Obsolete, will be deleted. More...
 
override bool Equals (object o)
 Determines whether this matrix is equal to the specified object. More...
 
bool Equals (XMatrix value)
 Determines whether this matrix is equal to the specified matrix. More...
 
override int GetHashCode ()
 Returns the hash code for this instance. More...
 
override string ToString ()
 Converts this XMatrix to a human readable string. More...
 
string ToString (IFormatProvider provider)
 Converts this XMatrix to a human readable string. More...
 
string IFormattable. ToString (string format, IFormatProvider provider)
 Converts this XMatrix to a human readable string. More...
 
void SetMatrix (double m11, double m12, double m21, double m22, double offsetX, double offsetY, XMatrixTypes type)
 Sets the matrix. More...
 
void DeriveMatrixType ()
 

Static Public Member Functions

static XMatrix operator* (XMatrix trans1, XMatrix trans2)
 Multiplies two matrices. More...
 
static XMatrix Multiply (XMatrix trans1, XMatrix trans2)
 Multiplies two matrices. More...
 
static operator System.Drawing.Drawing2D.Matrix (XMatrix matrix)
 Explicitly converts a XMatrix to a Matrix. More...
 
static implicit operator XMatrix (System.Drawing.Drawing2D.Matrix matrix)
 Implicitly converts a Matrix to an XMatrix. More...
 
static bool operator== (XMatrix matrix1, XMatrix matrix2)
 Determines whether the two matrices are equal. More...
 
static bool operator!= (XMatrix matrix1, XMatrix matrix2)
 Determines whether the two matrices are not equal. More...
 
static bool Equals (XMatrix matrix1, XMatrix matrix2)
 Determines whether the two matrices are equal. More...
 
static XMatrix Parse (string source)
 Parses a matrix from a string. More...
 
static XMatrix CreateIdentity ()
 
static XMatrix ()
 

Public Attributes

double m11
 
double m12
 
double m21
 
double m22
 
double offsetX
 
double offsetY
 
XMatrixTypes type
 
int padding
 

Static Public Attributes

static readonly XMatrix s_identity
 

Properties

static XMatrix Identity [get]
 Gets a value that indicates whether this matrix is an identity matrix. More...
 
bool IsIdentity [get]
 Gets a value indicating whether this matrix instance is the identity matrix. More...
 
double[] Elements [get]
 Gets an array of double values that represents the elements of this matrix. More...
 
double Determinant [get]
 Gets the determinant of this matrix. More...
 
bool HasInverse [get]
 Gets a value that indicates whether this matrix is invertible. More...
 
double M11 [get, set]
 Gets or sets the value of the first row and first column of this matrix. More...
 
double M12 [get, set]
 Gets or sets the value of the first row and second column of this matrix. More...
 
double M21 [get, set]
 Gets or sets the value of the second row and first column of this matrix. More...
 
double M22 [get, set]
 Gets or sets the value of the second row and second column of this matrix. More...
 
double OffsetX [get, set]
 Gets or sets the value of the third row and first column of this matrix. More...
 
double OffsetY [get, set]
 Gets or sets the value of the third row and second column of this matrix. More...
 

Detailed Description

Represents a 3-by-3 matrix that represents an affine 2D transformation.

Constructor & Destructor Documentation

◆ XMatrix() [1/2]

PdfSharp.Drawing.XMatrix.XMatrix ( double  m11,
double  m12,
double  m21,
double  m22,
double  offsetX,
double  offsetY 
)

Initializes a new instance of the XMatrix struct.

◆ XMatrix() [2/2]

static PdfSharp.Drawing.XMatrix.XMatrix ( )
static

Member Function Documentation

◆ Append()

void PdfSharp.Drawing.XMatrix.Append ( XMatrix  matrix)

Appends the specified matrix to this matrix.

◆ CreateIdentity()

static XMatrix PdfSharp.Drawing.XMatrix.CreateIdentity ( )
static

◆ DeriveMatrixType()

void PdfSharp.Drawing.XMatrix.DeriveMatrixType ( )

◆ Equals() [1/3]

override bool PdfSharp.Drawing.XMatrix.Equals ( object  o)

Determines whether this matrix is equal to the specified object.

◆ Equals() [2/3]

static bool PdfSharp.Drawing.XMatrix.Equals ( XMatrix  matrix1,
XMatrix  matrix2 
)
static

Determines whether the two matrices are equal.

◆ Equals() [3/3]

bool PdfSharp.Drawing.XMatrix.Equals ( XMatrix  value)

Determines whether this matrix is equal to the specified matrix.

◆ GetElements()

double [] PdfSharp.Drawing.XMatrix.GetElements ( )

Gets an array of double values that represents the elements of this matrix.

◆ GetHashCode()

override int PdfSharp.Drawing.XMatrix.GetHashCode ( )

Returns the hash code for this instance.

◆ InitIdentity()

void PdfSharp.Drawing.XMatrix.InitIdentity ( )

Fixes a bug that XMatrixTypes.Identity is not handled correctly in some cases.

◆ Invert()

void PdfSharp.Drawing.XMatrix.Invert ( )

Inverts the matrix.

◆ Multiply() [1/3]

void PdfSharp.Drawing.XMatrix.Multiply ( XMatrix  matrix)

Appends the specified matrix to this matrix.

◆ Multiply() [2/3]

void PdfSharp.Drawing.XMatrix.Multiply ( XMatrix  matrix,
XMatrixOrder  order 
)

Multiplies this matrix with the specified matrix.

◆ Multiply() [3/3]

static XMatrix PdfSharp.Drawing.XMatrix.Multiply ( XMatrix  trans1,
XMatrix  trans2 
)
static

Multiplies two matrices.

◆ MultiplyPrepend()

void PdfSharp.Drawing.XMatrix.MultiplyPrepend ( XMatrix  matrix)

Prepends the specified matrix to this matrix.

◆ operator System.Drawing.Drawing2D.Matrix()

static PdfSharp.Drawing.XMatrix.operator System.Drawing.Drawing2D.Matrix ( XMatrix  matrix)
explicitstatic

Explicitly converts a XMatrix to a Matrix.

◆ operator XMatrix()

static implicit PdfSharp.Drawing.XMatrix.operator XMatrix ( System.Drawing.Drawing2D.Matrix  matrix)
static

Implicitly converts a Matrix to an XMatrix.

◆ operator!=()

static bool PdfSharp.Drawing.XMatrix.operator!= ( XMatrix  matrix1,
XMatrix  matrix2 
)
static

Determines whether the two matrices are not equal.

◆ operator*()

static XMatrix PdfSharp.Drawing.XMatrix.operator* ( XMatrix  trans1,
XMatrix  trans2 
)
static

Multiplies two matrices.

◆ operator==()

static bool PdfSharp.Drawing.XMatrix.operator== ( XMatrix  matrix1,
XMatrix  matrix2 
)
static

Determines whether the two matrices are equal.

◆ Parse()

static XMatrix PdfSharp.Drawing.XMatrix.Parse ( string  source)
static

Parses a matrix from a string.

◆ Prepend()

void PdfSharp.Drawing.XMatrix.Prepend ( XMatrix  matrix)

Prepends the specified matrix to this matrix.

◆ Rotate() [1/2]

void PdfSharp.Drawing.XMatrix.Rotate ( double  angle)

Function is obsolete.

◆ Rotate() [2/2]

void PdfSharp.Drawing.XMatrix.Rotate ( double  angle,
XMatrixOrder  order 
)

Rotates the matrix with the specified angle.

◆ RotateAppend()

void PdfSharp.Drawing.XMatrix.RotateAppend ( double  angle)

Appends a rotation of the specified angle to this matrix.

◆ RotateAt() [1/3]

void PdfSharp.Drawing.XMatrix.RotateAt ( double  angle,
double  centerX,
double  centerY 
)

Function is obsolete.

◆ RotateAt() [2/3]

void PdfSharp.Drawing.XMatrix.RotateAt ( double  angle,
XPoint  point 
)

Rotates the matrix with the specified angle at the specified point.

◆ RotateAt() [3/3]

void PdfSharp.Drawing.XMatrix.RotateAt ( double  angle,
XPoint  point,
XMatrixOrder  order 
)

Rotates the matrix with the specified angle at the specified point.

◆ RotateAtAppend() [1/2]

void PdfSharp.Drawing.XMatrix.RotateAtAppend ( double  angle,
double  centerX,
double  centerY 
)

Appends a rotation of the specified angle at the specified point to this matrix.

◆ RotateAtAppend() [2/2]

void PdfSharp.Drawing.XMatrix.RotateAtAppend ( double  angle,
XPoint  point 
)

Appends a rotation of the specified angle at the specified point to this matrix.

◆ RotateAtPrepend() [1/2]

void PdfSharp.Drawing.XMatrix.RotateAtPrepend ( double  angle,
double  centerX,
double  centerY 
)

Prepends a rotation of the specified angle at the specified point to this matrix.

◆ RotateAtPrepend() [2/2]

void PdfSharp.Drawing.XMatrix.RotateAtPrepend ( double  angle,
XPoint  point 
)

Prepends a rotation of the specified angle at the specified point to this matrix.

◆ RotatePrepend()

void PdfSharp.Drawing.XMatrix.RotatePrepend ( double  angle)

Prepends a rotation of the specified angle to this matrix.

◆ Scale() [1/4]

void PdfSharp.Drawing.XMatrix.Scale ( double  scaleX,
double  scaleY 
)

Appends the specified scale vector to this matrix.

◆ Scale() [2/4]

void PdfSharp.Drawing.XMatrix.Scale ( double  scaleX,
double  scaleY,
XMatrixOrder  order 
)

Scales the matrix with the specified scalars.

◆ Scale() [3/4]

void PdfSharp.Drawing.XMatrix.Scale ( double  scaleXY)

Scales the matrix with the specified scalar.

◆ Scale() [4/4]

void PdfSharp.Drawing.XMatrix.Scale ( double  scaleXY,
XMatrixOrder  order 
)

Scales the matrix with the specified scalar.

◆ ScaleAppend() [1/2]

void PdfSharp.Drawing.XMatrix.ScaleAppend ( double  scaleX,
double  scaleY 
)

Appends the specified scale vector to this matrix.

◆ ScaleAppend() [2/2]

void PdfSharp.Drawing.XMatrix.ScaleAppend ( double  scaleXY)

Appends the specified scale vector to this matrix.

◆ ScaleAt()

void PdfSharp.Drawing.XMatrix.ScaleAt ( double  scaleX,
double  scaleY,
double  centerX,
double  centerY 
)

Function is obsolete.

◆ ScaleAtAppend()

void PdfSharp.Drawing.XMatrix.ScaleAtAppend ( double  scaleX,
double  scaleY,
double  centerX,
double  centerY 
)

Apppends the specified scale about the specified point of this matrix.

◆ ScaleAtPrepend()

void PdfSharp.Drawing.XMatrix.ScaleAtPrepend ( double  scaleX,
double  scaleY,
double  centerX,
double  centerY 
)

Prepends the specified scale about the specified point of this matrix.

◆ ScalePrepend() [1/2]

void PdfSharp.Drawing.XMatrix.ScalePrepend ( double  scaleX,
double  scaleY 
)

Prepends the specified scale vector to this matrix.

◆ ScalePrepend() [2/2]

void PdfSharp.Drawing.XMatrix.ScalePrepend ( double  scaleXY)

Prepends the specified scale vector to this matrix.

◆ SetIdentity()

void PdfSharp.Drawing.XMatrix.SetIdentity ( )

Sets this matrix into an identity matrix.

◆ SetMatrix()

void PdfSharp.Drawing.XMatrix.SetMatrix ( double  m11,
double  m12,
double  m21,
double  m22,
double  offsetX,
double  offsetY,
XMatrixTypes  type 
)

Sets the matrix.

◆ Shear() [1/2]

void PdfSharp.Drawing.XMatrix.Shear ( double  shearX,
double  shearY 
)

Function is obsolete.

◆ Shear() [2/2]

void PdfSharp.Drawing.XMatrix.Shear ( double  shearX,
double  shearY,
XMatrixOrder  order 
)

Shears the matrix with the specified scalars.

◆ ShearAppend()

void PdfSharp.Drawing.XMatrix.ShearAppend ( double  shearX,
double  shearY 
)

Appends a skew of the specified degrees in the x and y dimensions to this matrix.

◆ ShearPrepend()

void PdfSharp.Drawing.XMatrix.ShearPrepend ( double  shearX,
double  shearY 
)

Prepends a skew of the specified degrees in the x and y dimensions to this matrix.

◆ Skew()

void PdfSharp.Drawing.XMatrix.Skew ( double  skewX,
double  skewY 
)

Function is obsolete.

◆ SkewAppend()

void PdfSharp.Drawing.XMatrix.SkewAppend ( double  skewX,
double  skewY 
)

Appends a skew of the specified degrees in the x and y dimensions to this matrix.

◆ SkewPrepend()

void PdfSharp.Drawing.XMatrix.SkewPrepend ( double  skewX,
double  skewY 
)

Prepends a skew of the specified degrees in the x and y dimensions to this matrix.

◆ ToGdiMatrix()

System.Drawing.Drawing2D.Matrix PdfSharp.Drawing.XMatrix.ToGdiMatrix ( )

Converts this matrix to a System.Drawing.Drawing2D.Matrix object.

◆ ToGdipMatrix()

System.Drawing.Drawing2D.Matrix PdfSharp.Drawing.XMatrix.ToGdipMatrix ( )

Obsolete, will be deleted.

◆ ToString() [1/3]

override string PdfSharp.Drawing.XMatrix.ToString ( )

Converts this XMatrix to a human readable string.

◆ ToString() [2/3]

string PdfSharp.Drawing.XMatrix.ToString ( IFormatProvider  provider)

Converts this XMatrix to a human readable string.

◆ ToString() [3/3]

string IFormattable. PdfSharp.Drawing.XMatrix.ToString ( string  format,
IFormatProvider  provider 
)

Converts this XMatrix to a human readable string.

◆ Transform() [1/4]

XPoint PdfSharp.Drawing.XMatrix.Transform ( XPoint  point)

Transforms the specified point by this matrix and returns the result.

◆ Transform() [2/4]

void PdfSharp.Drawing.XMatrix.Transform ( XPoint[]  points)

Transforms the specified points by this matrix.

◆ Transform() [3/4]

XVector PdfSharp.Drawing.XMatrix.Transform ( XVector  vector)

Transforms the specified vector by this Matrix and returns the result.

◆ Transform() [4/4]

void PdfSharp.Drawing.XMatrix.Transform ( XVector[]  vectors)

Transforms the specified vectors by this matrix.

◆ TransformPoints() [1/2]

void PdfSharp.Drawing.XMatrix.TransformPoints ( System.Drawing.Point[]  points)

Multiplies all points of the specified array with the this matrix.

◆ TransformPoints() [2/2]

void PdfSharp.Drawing.XMatrix.TransformPoints ( XPoint[]  points)

Multiplies all points of the specified array with the this matrix.

◆ TransformVectors()

void PdfSharp.Drawing.XMatrix.TransformVectors ( PointF[]  points)

Multiplies all vectors of the specified array with the this matrix. The translation elements of this matrix (third row) are ignored.

◆ Translate() [1/2]

void PdfSharp.Drawing.XMatrix.Translate ( double  offsetX,
double  offsetY 
)

Appends a translation of the specified offsets to this matrix.

◆ Translate() [2/2]

void PdfSharp.Drawing.XMatrix.Translate ( double  offsetX,
double  offsetY,
XMatrixOrder  order 
)

Translates the matrix with the specified offsets.

◆ TranslateAppend()

void PdfSharp.Drawing.XMatrix.TranslateAppend ( double  offsetX,
double  offsetY 
)

Appends a translation of the specified offsets to this matrix.

◆ TranslatePrepend()

void PdfSharp.Drawing.XMatrix.TranslatePrepend ( double  offsetX,
double  offsetY 
)

Prepends a translation of the specified offsets to this matrix.

Member Data Documentation

◆ m11

double PdfSharp.Drawing.XMatrix.m11

◆ m12

double PdfSharp.Drawing.XMatrix.m12

◆ m21

double PdfSharp.Drawing.XMatrix.m21

◆ m22

double PdfSharp.Drawing.XMatrix.m22

◆ offsetX

double PdfSharp.Drawing.XMatrix.offsetX

◆ offsetY

double PdfSharp.Drawing.XMatrix.offsetY

◆ padding

int PdfSharp.Drawing.XMatrix.padding

◆ s_identity

readonly XMatrix PdfSharp.Drawing.XMatrix.s_identity
static

◆ type

XMatrixTypes PdfSharp.Drawing.XMatrix.type

Property Documentation

◆ Determinant

double PdfSharp.Drawing.XMatrix.Determinant
get

Gets the determinant of this matrix.

◆ Elements

double [] PdfSharp.Drawing.XMatrix.Elements
get

Gets an array of double values that represents the elements of this matrix.

◆ HasInverse

bool PdfSharp.Drawing.XMatrix.HasInverse
get

Gets a value that indicates whether this matrix is invertible.

◆ Identity

XMatrix PdfSharp.Drawing.XMatrix.Identity
staticget

Gets a value that indicates whether this matrix is an identity matrix.

◆ IsIdentity

bool PdfSharp.Drawing.XMatrix.IsIdentity
get

Gets a value indicating whether this matrix instance is the identity matrix.

◆ M11

double PdfSharp.Drawing.XMatrix.M11
getset

Gets or sets the value of the first row and first column of this matrix.

◆ M12

double PdfSharp.Drawing.XMatrix.M12
getset

Gets or sets the value of the first row and second column of this matrix.

◆ M21

double PdfSharp.Drawing.XMatrix.M21
getset

Gets or sets the value of the second row and first column of this matrix.

◆ M22

double PdfSharp.Drawing.XMatrix.M22
getset

Gets or sets the value of the second row and second column of this matrix.

◆ OffsetX

double PdfSharp.Drawing.XMatrix.OffsetX
getset

Gets or sets the value of the third row and first column of this matrix.

◆ OffsetY

double PdfSharp.Drawing.XMatrix.OffsetY
getset

Gets or sets the value of the third row and second column of this matrix.


The documentation for this struct was generated from the following file: