iText 8.0.2 API
iText.Kernel.Geom.Matrix Class Reference

Keeps all the values of a 3 by 3 matrix and allows you to do some math with matrices. More...

Public Member Functions

  Matrix ()
  constructs a new Matrix with identity. More...
 
  Matrix (float tx, float ty)
  Constructs a matrix that represents translation. More...
 
  Matrix (float e11, float e12, float e13, float e21, float e22, float e23, float e31, float e32, float e33)
  Creates a Matrix with 9 specified entries. More...
 
  Matrix (float a, float b, float c, float d, float e, float f)
  Creates a Matrix with 6 specified entries. More...
 
virtual float  Get (int index)
  Gets a specific value inside the matrix. More...
 
virtual iText.Kernel.Geom.Matrix  Multiply (iText.Kernel.Geom.Matrix by)
  multiplies this matrix by 'b' and returns the result. More...
 
virtual iText.Kernel.Geom.Matrix  Add (iText.Kernel.Geom.Matrix arg)
  Adds a matrix from this matrix and returns the results. More...
 
virtual iText.Kernel.Geom.Matrix  Subtract (iText.Kernel.Geom.Matrix arg)
  Subtracts a matrix from this matrix and returns the results. More...
 
virtual float  GetDeterminant ()
  Computes the determinant of the matrix. More...
 
override bool  Equals (Object obj)
  Checks equality of matrices. More...
 
override int  GetHashCode ()
  Generates a hash code for this object. More...
 
override String  ToString ()
  Generates a String representation of the matrix. More...
 

Static Public Attributes

const int  I11 = 0
  the row=1, col=1 position ('a') in the matrix. More...
 
const int  I12 = 1
  the row=1, col=2 position ('b') in the matrix. More...
 
const int  I13 = 2
  the row=1, col=3 position (always 0 for 2-D) in the matrix. More...
 
const int  I21 = 3
  the row=2, col=1 position ('c') in the matrix. More...
 
const int  I22 = 4
  the row=2, col=2 position ('d') in the matrix. More...
 
const int  I23 = 5
  the row=2, col=3 position (always 0 for 2-D) in the matrix. More...
 
const int  I31 = 6
  the row=3, col=1 ('e', or X translation) position in the matrix. More...
 
const int  I32 = 7
  the row=3, col=2 ('f', or Y translation) position in the matrix. More...
 
const int  I33 = 8
  the row=3, col=3 position (always 1 for 2-D) in the matrix. More...
 

Detailed Description

Keeps all the values of a 3 by 3 matrix and allows you to do some math with matrices.

Constructor & Destructor Documentation

◆ Matrix() [1/4]

iText.Kernel.Geom.Matrix.Matrix ( )
inline

constructs a new Matrix with identity.

◆ Matrix() [2/4]

iText.Kernel.Geom.Matrix.Matrix ( float  tx,
float  ty 
)
inline

Constructs a matrix that represents translation.

Parameters
tx x-axis translation
ty y-axis translation

◆ Matrix() [3/4]

iText.Kernel.Geom.Matrix.Matrix ( float  e11,
float  e12,
float  e13,
float  e21,
float  e22,
float  e23,
float  e31,
float  e32,
float  e33 
)
inline

Creates a Matrix with 9 specified entries.

Parameters
e11 element at position (1,1)
e12 element at position (1,2)
e13 element at position (1,3)
e21 element at position (2,1)
e22 element at position (2,2)
e23 element at position (2,3)
e31 element at position (3,1)
e32 element at position (3,2)
e33 element at position (3,3)

◆ Matrix() [4/4]

iText.Kernel.Geom.Matrix.Matrix ( float  a,
float  b,
float  c,
float  d,
float  e,
float  f 
)
inline

Creates a Matrix with 6 specified entries.

Creates a Matrix with 6 specified entries. The third column will always be [0 0 1] (row, column)

Parameters
a element at (1,1)
b element at (1,2)
c element at (2,1)
d element at (2,2)
e element at (3,1)
f element at (3,2)

Member Function Documentation

◆ Add()

virtual iText.Kernel.Geom.Matrix iText.Kernel.Geom.Matrix.Add ( iText.Kernel.Geom.Matrix  arg )
inlinevirtual

Adds a matrix from this matrix and returns the results.

Parameters
arg the matrix to subtract from this matrix
Returns
a Matrix object

◆ Equals()

override bool iText.Kernel.Geom.Matrix.Equals ( Object  obj )
inline

Checks equality of matrices.

Parameters
obj the other Matrix that needs to be compared with this matrix.
Returns
true if both matrices are equal
See also
System.Object.Equals(System.Object)

◆ Get()

virtual float iText.Kernel.Geom.Matrix.Get ( int  index )
inlinevirtual

Gets a specific value inside the matrix.

Gets a specific value inside the matrix.

For reference, the indeces are as follows:
I11 I12 I13
I21 I22 I23
I31 I32 I33

Parameters
index an array index corresponding with a value inside the matrix
Returns
the value at that specific position.

◆ GetDeterminant()

virtual float iText.Kernel.Geom.Matrix.GetDeterminant ( )
inlinevirtual

Computes the determinant of the matrix.

Returns
the determinant of the matrix

◆ GetHashCode()

override int iText.Kernel.Geom.Matrix.GetHashCode ( )
inline

Generates a hash code for this object.

Returns
the hash code of this object
See also
System.Object.GetHashCode()

◆ Multiply()

virtual iText.Kernel.Geom.Matrix iText.Kernel.Geom.Matrix.Multiply ( iText.Kernel.Geom.Matrix  by )
inlinevirtual

multiplies this matrix by 'b' and returns the result.

multiplies this matrix by 'b' and returns the result. See http://en.wikipedia.org/wiki/Matrix_multiplication

Parameters
by The matrix to multiply by
Returns
the resulting matrix

◆ Subtract()

virtual iText.Kernel.Geom.Matrix iText.Kernel.Geom.Matrix.Subtract ( iText.Kernel.Geom.Matrix  arg )
inlinevirtual

Subtracts a matrix from this matrix and returns the results.

Parameters
arg the matrix to subtract from this matrix
Returns
a Matrix object

◆ ToString()

override String iText.Kernel.Geom.Matrix.ToString ( )
inline

Generates a String representation of the matrix.

Returns
the values, delimited with tabs and newlines.
See also
System.Object.ToString()

Member Data Documentation

◆ I11

const int iText.Kernel.Geom.Matrix.I11 = 0
static

the row=1, col=1 position ('a') in the matrix.

◆ I12

const int iText.Kernel.Geom.Matrix.I12 = 1
static

the row=1, col=2 position ('b') in the matrix.

◆ I13

const int iText.Kernel.Geom.Matrix.I13 = 2
static

the row=1, col=3 position (always 0 for 2-D) in the matrix.

◆ I21

const int iText.Kernel.Geom.Matrix.I21 = 3
static

the row=2, col=1 position ('c') in the matrix.

◆ I22

const int iText.Kernel.Geom.Matrix.I22 = 4
static

the row=2, col=2 position ('d') in the matrix.

◆ I23

const int iText.Kernel.Geom.Matrix.I23 = 5
static

the row=2, col=3 position (always 0 for 2-D) in the matrix.

◆ I31

const int iText.Kernel.Geom.Matrix.I31 = 6
static

the row=3, col=1 ('e', or X translation) position in the matrix.

◆ I32

const int iText.Kernel.Geom.Matrix.I32 = 7
static

the row=3, col=2 ('f', or Y translation) position in the matrix.

◆ I33

const int iText.Kernel.Geom.Matrix.I33 = 8
static

the row=3, col=3 position (always 1 for 2-D) in the matrix.