Foxit PDF SDK
FoxitPDFSDKPython3.Matrix2D Class Reference

Inherits FoxitPDFSDKPython3._object.

Public Member Functions

def Matrix2D ()
 Construct a identity transformation matrix.

 
def Matrix2D (a1, b1, c1, d1, e1, f1)
 Construct a matrix with six input coefficients.
More...
 
def Concat (m, bPrepended)
 Concatenate with another matrix.
More...
 
def ConcatInverse (m, bPrepended)
 Concatenate the inverse of another matrix.
More...
 
def Copy (m)
 Copy coefficients from another matrix.
More...
 
def GetUnitArea ()
 Get area of the parallelogram composing two unit vectors.
More...
 
def GetUnitRect ()
 Get a bounding rectangle of the parallelogram composing two unit vectors.
More...
 
def GetXUnit ()
 Get the x-direction unit size.
More...
 
def GetYUnit ()
 Get the y-direction unit size.
More...
 
def Is90Rotated ()
 Whether this matrix has rotating of 90, or -90 degrees.
More...
 
def IsIdentity ()
 Determine whether a matrix is an identity transformation or not.
More...
 
def IsInvertible ()
 Determine whether a matrix is invertible or not.
More...
 
def IsScaled ()
 Whether this matrix has scaling (or translating) only. No rotating.
More...
 
def MatchRect (dest, src)
 Get a matrix that transforms a source rectangle to dest rectangle.
More...
 
def Reset ()
 Reset current matrix.
More...
 
def Rotate (fRadian, bPrepended)
 Rotate the matrix.
More...
 
def RotateAt (fRadian, x, y, bPrepended)
 Rotate the matrix at a position.
More...
 
def Scale (sx, sy, bPrepended)
 Scale the matrix.
More...
 
def Set (n)
 Change the coefficients in the matrix.
More...
 
def SetIdentity ()
 Set the matrix to be an identity transformation matrix.
More...
 
def SetReverse (m)
 Set the coefficients of the inverse of another matrix to this matrix.
More...
 
def Shear (fAlphaRadian, fBetaRadian, bPrepended)
 Shear the matrix.
More...
 
def TransformDistance (distance)
 Transform a distance.
More...
 
def TransformPoint (x, y)
 Transform point specified by x and y value.
More...
 
def TransformRect (rect)
 Transform a rectangle and return a bounding rectangle. The result rectangle is always normalized: left <= right, and bottom <= top.
More...
 
def TransformXDistance (dx)
 Transform a x-distance.
More...
 
def TransformYDistance (dy)
 Transform a y-distance.
More...
 
def Translate (x, y, bPrepended)
 Translate the matrix.
More...
 
def TranslateI (x, y, bPrepended)
 Translate the matrix. using integer value.
More...
 

Static Public Attributes

 a = _swig_property(_fsdk.Matrix2D_a_get, _fsdk.Matrix2D_a_set)
 The coefficient a.

 
 b = _swig_property(_fsdk.Matrix2D_b_get, _fsdk.Matrix2D_b_set)
 The coefficient b.

 
 c = _swig_property(_fsdk.Matrix2D_c_get, _fsdk.Matrix2D_c_set)
 The coefficient c.

 
 d = _swig_property(_fsdk.Matrix2D_d_get, _fsdk.Matrix2D_d_set)
 The coefficient d.

 
 e = _swig_property(_fsdk.Matrix2D_e_get, _fsdk.Matrix2D_e_set)
 The coefficient e.

 
 f = _swig_property(_fsdk.Matrix2D_f_get, _fsdk.Matrix2D_f_set)
 The coefficient f.

 

Detailed Description

Affine (linear) transformation matrix.

It defines six coefficients: a, b, c, d, e, f. The transformation equations are: dest_x = a * src_x + c * src_y + e; dest_y = b * src_x + d * src_y + f;

Constructor & Destructor Documentation

◆ Matrix2D()

FoxitPDFSDKPython3.Matrix2D.Matrix2D (   a1,
  b1,
  c1,
  d1,
  e1,
  f1 
)

Construct a matrix with six input coefficients.

Parameters
[in]a1The input coefficient a.
[in]b1The input coefficient b.
[in]c1The input coefficient c.
[in]d1The input coefficient d.
[in]e1The input coefficient e.
[in]f1The input coefficient f.

Member Function Documentation

◆ Concat()

def FoxitPDFSDKPython3.Matrix2D.Concat (   m,
  bPrepended 
)

Concatenate with another matrix.

Parameters
[in]mThe input matrix.
[in]bPrependedIf this is true, the concatenation matrix is multiplied at left side, or at right side.
Returns
None.

◆ ConcatInverse()

def FoxitPDFSDKPython3.Matrix2D.ConcatInverse (   m,
  bPrepended 
)

Concatenate the inverse of another matrix.

Parameters
[in]mThe input matrix.
[in]bPrependedIf this is true, the concatenation matrix is multiplied at left side, or at right side.
Returns
None.

◆ Copy()

def FoxitPDFSDKPython3.Matrix2D.Copy (   m)

Copy coefficients from another matrix.

Parameters
[in]mThe input matrix.
Returns
None.

◆ GetUnitArea()

def FoxitPDFSDKPython3.Matrix2D.GetUnitArea ( )

Get area of the parallelogram composing two unit vectors.

Returns
The area of the parallelogram composing two unit vectors.

◆ GetUnitRect()

def FoxitPDFSDKPython3.Matrix2D.GetUnitRect ( )

Get a bounding rectangle of the parallelogram composing two unit vectors.

Returns
The unit rect.

◆ GetXUnit()

def FoxitPDFSDKPython3.Matrix2D.GetXUnit ( )

Get the x-direction unit size.

Returns
The x-direction unit size.

◆ GetYUnit()

def FoxitPDFSDKPython3.Matrix2D.GetYUnit ( )

Get the y-direction unit size.

Returns
The y-direction unit size.

◆ Is90Rotated()

def FoxitPDFSDKPython3.Matrix2D.Is90Rotated ( )

Whether this matrix has rotating of 90, or -90 degrees.

Returns
true means current matrix has rotating of 90, or -90 degrees, while false means not.

◆ IsIdentity()

def FoxitPDFSDKPython3.Matrix2D.IsIdentity ( )

Determine whether a matrix is an identity transformation or not.

Returns
true means current matrix is identity, while false means not.

◆ IsInvertible()

def FoxitPDFSDKPython3.Matrix2D.IsInvertible ( )

Determine whether a matrix is invertible or not.

Returns
true means current matrix is invertible, while false means not.

◆ IsScaled()

def FoxitPDFSDKPython3.Matrix2D.IsScaled ( )

Whether this matrix has scaling (or translating) only. No rotating.

Returns
true means current matrix has scaling (or translating) only, while false means not.

◆ MatchRect()

def FoxitPDFSDKPython3.Matrix2D.MatchRect (   dest,
  src 
)

Get a matrix that transforms a source rectangle to dest rectangle.

Parameters
[in]destThe dest rectangle.
[in]srcThe source rectangle.
Returns
None.

◆ Reset()

def FoxitPDFSDKPython3.Matrix2D.Reset ( )

Reset current matrix.

Returns
None.

◆ Rotate()

def FoxitPDFSDKPython3.Matrix2D.Rotate (   fRadian,
  bPrepended 
)

Rotate the matrix.

Parameters
[in]fRadianRotation angle in radian.
[in]bPrependedIf it's true, a rotation matrix is multiplied at left side, or at right side.
Returns
None.

◆ RotateAt()

def FoxitPDFSDKPython3.Matrix2D.RotateAt (   fRadian,
  x,
  y,
  bPrepended 
)

Rotate the matrix at a position.

Parameters
[in]fRadianRotation angle in radian.
[in]xThe x coordinate from which to rotate.
[in]yThe y coordinate from which to rotate.
[in]bPrependedIf this is true, a rotation matrix is multiplied at left side, or at right side.
Returns
None.

◆ Scale()

def FoxitPDFSDKPython3.Matrix2D.Scale (   sx,
  sy,
  bPrepended 
)

Scale the matrix.

Parameters
[in]sxThe x-direction scale coefficient.
[in]syThe y-direction scale coefficient.
[in]bPrependedIf this is true, a scaling matrix is multiplied at left side, or at right side.
Returns
None.

◆ Set()

def FoxitPDFSDKPython3.Matrix2D.Set (   n)

Change the coefficients in the matrix.

Parameters
[in]nThe input coefficient array.
Returns
None.

◆ SetIdentity()

def FoxitPDFSDKPython3.Matrix2D.SetIdentity ( )

Set the matrix to be an identity transformation matrix.

Returns
None.

◆ SetReverse()

def FoxitPDFSDKPython3.Matrix2D.SetReverse (   m)

Set the coefficients of the inverse of another matrix to this matrix.

Parameters
[in]mThe input matrix.
Returns
None.

◆ Shear()

def FoxitPDFSDKPython3.Matrix2D.Shear (   fAlphaRadian,
  fBetaRadian,
  bPrepended 
)

Shear the matrix.

Parameters
[in]fAlphaRadianShearing angle of x axis.
[in]fBetaRadianShearing angle of y axis.
[in]bPrependedIf this is true, a shearing matrix is multiplied at left side, or at right side.
Returns
None.

◆ TransformDistance()

def FoxitPDFSDKPython3.Matrix2D.TransformDistance (   distance)

Transform a distance.

Parameters
[in]distanceThe input distance.
Returns
The transformed distance.

◆ TransformPoint()

def FoxitPDFSDKPython3.Matrix2D.TransformPoint (   x,
  y 
)

Transform point specified by x and y value.

Parameters
[in,out]xThe input x-coordinate of the point, and it receives the output transformed x-coordinate.
[in,out]yThe input y-coordinate of the point, and it receives the output transformed y-coordinate.
Returns
None.

◆ TransformRect()

def FoxitPDFSDKPython3.Matrix2D.TransformRect (   rect)

Transform a rectangle and return a bounding rectangle. The result rectangle is always normalized: left <= right, and bottom <= top.

Parameters
[in,out]rectThe input rectangle, and it receives the output transformed and normalized rectangle.
Returns
None.

◆ TransformXDistance()

def FoxitPDFSDKPython3.Matrix2D.TransformXDistance (   dx)

Transform a x-distance.

Parameters
[in]dxThe input x-distance.
Returns
The transformed distance.

◆ TransformYDistance()

def FoxitPDFSDKPython3.Matrix2D.TransformYDistance (   dy)

Transform a y-distance.

Parameters
[in]dyThe input y-distance.
Returns
The transformed distance.

◆ Translate()

def FoxitPDFSDKPython3.Matrix2D.Translate (   x,
  y,
  bPrepended 
)

Translate the matrix.

Parameters
[in]xThe x-direction delta value.
[in]yThe y-direction delta value.
[in]bPrependedIf this is true, a translation matrix is multiplied at left side, or at right side.
Returns
None.

◆ TranslateI()

def FoxitPDFSDKPython3.Matrix2D.TranslateI (   x,
  y,
  bPrepended 
)

Translate the matrix. using integer value.

Parameters
[in]xThe x-direction delta integer value.
[in]yThe y-direction delta integer value.
[in]bPrependedIf this is true, a translation matrix is multiplied at left side, or at right side.
Returns
None.