Foxit PDF SDK
FSDK.Matrix2D Class Reference

Public Member Functions

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

Public Attributes

 a
 The coefficient a.
 
 b
 The coefficient b.
 
 c
 The coefficient c.
 
 d
 The coefficient d.
 
 e
 The coefficient e.
 
 f
 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;

Member Function Documentation

◆ Concat() [1/2]

FSDK.Matrix2D.Concat ( a  ,
b  ,
c  ,
d  ,
e  ,
f  ,
bPrepended   
)

Concatenate with another matrix.

Parameters
[in]aThe coefficient a of the input matrix.
[in]bThe coefficient b of the input matrix.
[in]cThe coefficient c of the input matrix.
[in]dThe coefficient d of the input matrix.
[in]eThe coefficient e of the input matrix.
[in]fThe coefficient f of the input matrix.
[in]bPrependedIf this is true, the concatenation matrix is multiplied at left side, or at right side.
Returns
None.

◆ Concat() [2/2]

FSDK.Matrix2D.Concat ( ,
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()

FSDK.Matrix2D.ConcatInverse ( ,
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.

◆ constructor()

FSDK.Matrix2D.constructor ( 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.

◆ GetUnitArea()

FSDK.Matrix2D.GetUnitArea ( )

Get area of the parallelogram composing two unit vectors.

Returns
The area of the parallelogram composing two unit vectors.

◆ GetUnitRect()

FSDK.Matrix2D.GetUnitRect ( )

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

Returns
The unit rect.

◆ GetXUnit()

FSDK.Matrix2D.GetXUnit ( )

Get the x-direction unit size.

Returns
The x-direction unit size.

◆ GetYUnit()

FSDK.Matrix2D.GetYUnit ( )

Get the y-direction unit size.

Returns
The y-direction unit size.

◆ Is90Rotated()

FSDK.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()

Reset () FSDK.Matrix2D.IsIdentity ( )

Reset current matrix.

Returns
None.

Copy coefficients from another matrix.

Parameters
[in]mThe input matrix.
Returns
None.

Determine whether a matrix is an identity transformation or not.

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

◆ IsInvertible()

FSDK.Matrix2D.IsInvertible ( )

Determine whether a matrix is invertible or not.

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

◆ IsScaled()

FSDK.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()

FSDK.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.

◆ Rotate()

FSDK.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()

FSDK.Matrix2D.RotateAt ( fRadian  ,
,
,
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()

FSDK.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()

FSDK.Matrix2D.Set ( a  ,
b  ,
c  ,
d  ,
e  ,
f   
)

Change the coefficients in the matrix.

Parameters
[in]aThe input coefficient a.
[in]bThe input coefficient b.
[in]cThe input coefficient c.
[in]dThe input coefficient d.
[in]eThe input coefficient e.
[in]fThe input coefficient f.
Returns
None.

◆ SetIdentity()

FSDK.Matrix2D.SetIdentity ( )

Set the matrix to be an identity transformation matrix.

Returns
None.

◆ SetReverse()

FSDK.Matrix2D.SetReverse ( )

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

Parameters
[in]mThe input matrix.
Returns
None.

◆ Shear()

FSDK.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() [1/3]

FSDK.Matrix2D.TransformDistance ( distance  )

Transform a distance.

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

◆ TransformDistance() [2/3]

FSDK.Matrix2D.TransformDistance ( dx  ,
dy   
)

Transform distance specified by x and y value.

Parameters
[in]dxThe input x value.
[in]dyThe input y value.
Returns
The transformed distance.

◆ TransformDistance() [3/3]

FSDK.Matrix2D.TransformDistance ( dx  ,
dy   
)

Transform distance specified by x and y value.

Parameters
[in]dxThe input x value.
[in]dyThe input y value.
Returns
The transformed distance.

◆ TransformPoint()

FSDK.Matrix2D.TransformPoint ( ,
 
)

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() [1/2]

FSDK.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.

◆ TransformRect() [2/2]

FSDK.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()

FSDK.Matrix2D.TransformXDistance ( dx  )

Transform a x-distance.

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

◆ TransformYDistance()

FSDK.Matrix2D.TransformYDistance ( dy  )

Transform a y-distance.

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

◆ Translate()

FSDK.Matrix2D.Translate ( ,
,
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()

FSDK.Matrix2D.TranslateI ( ,
,
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.