Foxit PDF SDK
|
Inherits CFX_Object.
Public Member Functions | |
CFX_Matrix () | |
Construct a identity transformation matrix. | |
CFX_Matrix (FX_FLOAT a1, FX_FLOAT b1, FX_FLOAT c1, FX_FLOAT d1, FX_FLOAT e1, FX_FLOAT f1) | |
Construct a matrix with six input coefficients. More... | |
void | Concat (FX_FLOAT a, FX_FLOAT b, FX_FLOAT c, FX_FLOAT d, FX_FLOAT e, FX_FLOAT f, FX_BOOL bPrepended=false) |
Concatenate with another matrix. More... | |
void | Concat (const CFX_Matrix &m, FX_BOOL bPrepended=false) |
Concatenate with another matrix. More... | |
void | ConcatInverse (const CFX_Matrix &m, FX_BOOL bPrepended=false) |
Concatenate the inverse of another matrix. More... | |
void | Copy (const CFX_Matrix &m) |
Copy coefficients from another matrix. More... | |
FX_FLOAT | GetA () const |
Get the coefficient a. More... | |
FX_FLOAT | GetB () const |
Get the coefficient b. More... | |
FX_FLOAT | GetC () const |
Get the coefficient c. More... | |
FX_FLOAT | GetD () const |
Get the coefficient d. More... | |
FX_FLOAT | GetE () const |
Get the coefficient e. More... | |
FX_FLOAT | GetF () const |
Get the coefficient f. More... | |
FX_FLOAT | GetUnitArea () const |
Get area of the parallelogram composing two unit vectors. More... | |
void | GetUnitParallelogram (CFX_ParallelogramF &pg) const |
Get a parallelogram conposing two unit vectors. More... | |
void | GetUnitRect (CFX_RectF &rect) const |
Get a bounding rectangle of the parallelogram composing two unit vectors. More... | |
CFX_FloatRect | GetUnitRect () const |
Get a bounding rectangle of the parallelogram composing two unit vectors. More... | |
FX_FLOAT | GetXUnit () const |
Get the x-direction unit size. More... | |
FX_FLOAT | GetYUnit () const |
Get the y-direction unit size. More... | |
FX_BOOL | Is90Rotated () const |
Whether this matrix has rotating of 90, or -90 degrees. More... | |
FX_BOOL | IsIdentity () const |
Determine whether a matrix is an identity transformation or not. More... | |
FX_BOOL | IsInvertible () const |
Determine whether a matrix is invertible or not. More... | |
FX_BOOL | IsScaled () const |
Whether this matrix has scaling (or translating) only. No rotating. More... | |
void | MatchRect (const CFX_FloatRect &dest, const CFX_FloatRect &src) |
Get a matrix that transforms a source rectangle to dest rectangle. More... | |
FX_BOOL | operator != (const CFX_Matrix &src) const |
Compare(!=) operator overload. Compare two matrixs. More... | |
FX_BOOL | operator== (const CFX_Matrix &src) const |
Compare(==) operator overload. Compare two matrixs. More... | |
void | Reset () |
Reset current matrix. More... | |
void | Rotate (FX_FLOAT fRadian, FX_BOOL bPrepended=false) |
Rotate the matrix. More... | |
void | RotateAt (FX_FLOAT fRadian, FX_FLOAT x, FX_FLOAT y, FX_BOOL bPrepended=false) |
Rotate the matrix at a position. More... | |
void | Scale (FX_FLOAT sx, FX_FLOAT sy, FX_BOOL bPrepended=false) |
Scale the matrix. More... | |
void | Set (FX_FLOAT a, FX_FLOAT b, FX_FLOAT c, FX_FLOAT d, FX_FLOAT e, FX_FLOAT f) |
Change the coefficients in the matrix. More... | |
void | Set (const FX_FLOAT n[6]) |
Change the coefficients in the matrix. More... | |
void | SetIdentity () |
Set the matrix to be an identity transformation matrix. More... | |
void | SetReverse (const CFX_Matrix &m) |
Set the coefficients of the inverse of another matrix to this matrix. More... | |
void | Shear (FX_FLOAT fAlphaRadian, FX_FLOAT fBetaRadian, FX_BOOL bPrepended=false) |
Shear the matrix. More... | |
void | Transform (FX_FLOAT &x, FX_FLOAT &y) const |
Transform a point. More... | |
void | Transform (FX_FLOAT x, FX_FLOAT y, FX_FLOAT &x1, FX_FLOAT &y1) const |
Transform a point. More... | |
FX_FLOAT | TransformDistance (FX_FLOAT dx, FX_FLOAT dy) const |
Transform distance specified by x and y value. More... | |
FX_INT32 | TransformDistance (FX_INT32 dx, FX_INT32 dy) const |
Transform distance specified by x and y value. More... | |
FX_FLOAT | TransformDistance (FX_FLOAT distance) const |
Transform a distance. More... | |
void | TransformParallelogram (CFX_ParallelogramF &pg) const |
Transform a parallelogram. More... | |
void | TransformParallelogram (CFX_Parallelogram &pg) const |
Transform a parallelogram. More... | |
void | TransformPoint (FX_FLOAT &x, FX_FLOAT &y) const |
Transform point specified by x and y value. More... | |
void | TransformPoint (FX_INT32 &x, FX_INT32 &y) const |
Transform point specified by x and y value. More... | |
void | TransformPoints (CFX_PointF *points, FX_INT32 iCount) const |
Transform points. More... | |
void | TransformPoints (CFX_Point *points, FX_INT32 iCount) const |
Transform points. More... | |
void | TransformRect (CFX_RectF &rect) const |
Transform a rectangle and return a bounding rectangle. The result rectangle is always normalized: left <= right, and top <= bottom. More... | |
void | TransformRect (CFX_Rect &rect) const |
Transform a rectangle and return a bounding rectangle. The result rectangle is always normalized: left <= right, and top <= bottom. More... | |
void | TransformRect (FX_FLOAT &left, FX_FLOAT &right, FX_FLOAT &top, FX_FLOAT &bottom) const |
Transform a rectangle and return a bounding rectangle. The result rectangle is always normalized: left <= right, and bottom <= top. More... | |
void | TransformRect (CFX_FloatRect &rect) const |
Transform a rectangle and return a bounding rectangle. The result rectangle is always normalized: left <= right, and bottom <= top. More... | |
void | TransformRect (FX_RECT &rect) const |
Transform a rectangle and return a bounding rectangle. The result rectangle is always normalized: left <= right, and bottom <= top. More... | |
void | TransformRoundRect (CFX_RoundRectF &rr) const |
Transform a round rectangle. More... | |
void | TransformRoundRect (CFX_RoundRect &rr) const |
Transform a round rectangle. More... | |
void | TransformVector (CFX_VectorF &v) const |
Transform a vector. More... | |
void | TransformVector (CFX_Vector &v) const |
Transform a vector. More... | |
FX_FLOAT | TransformXDistance (FX_FLOAT dx) const |
Transform a x-distance. More... | |
FX_INT32 | TransformXDistance (FX_INT32 dx) const |
Transform a x-distance. More... | |
FX_FLOAT | TransformYDistance (FX_FLOAT dy) const |
Transform a y-distance. More... | |
FX_INT32 | TransformYDistance (FX_INT32 dy) const |
Transform a y-distance. More... | |
void | Translate (FX_FLOAT x, FX_FLOAT y, FX_BOOL bPrepended=false) |
Translate the matrix. More... | |
void | TranslateI (FX_INT32 x, FX_INT32 y, FX_BOOL bPrepended=false) |
Translate the matrix. using integer value. More... | |
Public Attributes | |
FX_FLOAT | a |
The coefficient a. | |
FX_FLOAT | b |
The coefficient b. | |
FX_FLOAT | c |
The coefficient c. | |
FX_FLOAT | d |
The coefficient d. | |
FX_FLOAT | e |
The coefficient e. | |
FX_FLOAT | f |
The coefficient f. | |
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;
|
inline |
Construct a matrix with six input coefficients.
[in] | a1 | The input coefficient a. |
[in] | b1 | The input coefficient b. |
[in] | c1 | The input coefficient c. |
[in] | d1 | The input coefficient d. |
[in] | e1 | The input coefficient e. |
[in] | f1 | The input coefficient f. |
void CFX_Matrix::Concat | ( | FX_FLOAT | a, |
FX_FLOAT | b, | ||
FX_FLOAT | c, | ||
FX_FLOAT | d, | ||
FX_FLOAT | e, | ||
FX_FLOAT | f, | ||
FX_BOOL | bPrepended = false |
||
) |
Concatenate with another matrix.
[in] | a | The coefficient a of the input matrix. |
[in] | b | The coefficient b of the input matrix. |
[in] | c | The coefficient c of the input matrix. |
[in] | d | The coefficient d of the input matrix. |
[in] | e | The coefficient e of the input matrix. |
[in] | f | The coefficient f of the input matrix. |
[in] | bPrepended | If this is true, the concatenation matrix is multiplied at left side, or at right side. |
void CFX_Matrix::Concat | ( | const CFX_Matrix & | m, |
FX_BOOL | bPrepended = false |
||
) |
Concatenate with another matrix.
[in] | m | The input matrix. |
[in] | bPrepended | If this is true, the concatenation matrix is multiplied at left side, or at right side. |
void CFX_Matrix::ConcatInverse | ( | const CFX_Matrix & | m, |
FX_BOOL | bPrepended = false |
||
) |
Concatenate the inverse of another matrix.
[in] | m | The input matrix. |
[in] | bPrepended | If this is true, the concatenation matrix is multiplied at left side, or at right side. |
|
inline |
Copy coefficients from another matrix.
[in] | m | The input matrix. |
|
inline |
Get the coefficient a.
|
inline |
Get the coefficient b.
|
inline |
Get the coefficient c.
|
inline |
Get the coefficient d.
|
inline |
Get the coefficient e.
|
inline |
Get the coefficient f.
FX_FLOAT CFX_Matrix::GetUnitArea | ( | ) | const |
Get area of the parallelogram composing two unit vectors.
void CFX_Matrix::GetUnitParallelogram | ( | CFX_ParallelogramF & | pg | ) | const |
Get a parallelogram conposing two unit vectors.
[out] | pg | It recieves the outputting unit parallelogram. |
void CFX_Matrix::GetUnitRect | ( | CFX_RectF & | rect | ) | const |
Get a bounding rectangle of the parallelogram composing two unit vectors.
[out] | rect | It recieves the outputting unit rect. |
CFX_FloatRect CFX_Matrix::GetUnitRect | ( | ) | const |
Get a bounding rectangle of the parallelogram composing two unit vectors.
FX_FLOAT CFX_Matrix::GetXUnit | ( | ) | const |
Get the x-direction unit size.
FX_FLOAT CFX_Matrix::GetYUnit | ( | ) | const |
Get the y-direction unit size.
FX_BOOL CFX_Matrix::Is90Rotated | ( | ) | const |
Whether this matrix has rotating of 90, or -90 degrees.
|
inline |
Determine whether a matrix is an identity transformation or not.
FX_BOOL CFX_Matrix::IsInvertible | ( | ) | const |
Determine whether a matrix is invertible or not.
FX_BOOL CFX_Matrix::IsScaled | ( | ) | const |
Whether this matrix has scaling (or translating) only. No rotating.
void CFX_Matrix::MatchRect | ( | const CFX_FloatRect & | dest, |
const CFX_FloatRect & | src | ||
) |
Get a matrix that transforms a source rectangle to dest rectangle.
[in] | dest | The dest rectangle. |
[in] | src | The source rectangle. |
|
inline |
Compare(!=) operator overload. Compare two matrixs.
[in] | src | The matrix to compare. |
|
inline |
Compare(==) operator overload. Compare two matrixs.
[in] | src | The matrix to compare. |
|
inline |
Reset current matrix.
Rotate the matrix.
[in] | fRadian | Rotation angle in radian. |
[in] | bPrepended | If it's true, a rotation matrix is multiplied at left side, or at right side. |
Rotate the matrix at a position.
[in] | fRadian | Rotation angle in radian. |
[in] | x | The x coordinate from which to rotate. |
[in] | y | The y coordinate from which to rotate. |
[in] | bPrepended | If this is true, a rotation matrix is multiplied at left side, or at right side. |
Scale the matrix.
[in] | sx | The x-direction scale coefficient. |
[in] | sy | The y-direction scale coefficient. |
[in] | bPrepended | If this is true, a scaling matrix is multiplied at left side, or at right side. |
Change the coefficients in the matrix.
[in] | a | The input coefficient a. |
[in] | b | The input coefficient b. |
[in] | c | The input coefficient c. |
[in] | d | The input coefficient d. |
[in] | e | The input coefficient e. |
[in] | f | The input coefficient f. |
void CFX_Matrix::Set | ( | const FX_FLOAT | n[6] | ) |
Change the coefficients in the matrix.
[in] | n | The input coefficient array. |
|
inline |
Set the matrix to be an identity transformation matrix.
void CFX_Matrix::SetReverse | ( | const CFX_Matrix & | m | ) |
Set the coefficients of the inverse of another matrix to this matrix.
[in] | m | The input matrix. |
Shear the matrix.
[in] | fAlphaRadian | Shearing angle of x axis. |
[in] | fBetaRadian | Shearing angle of y axis. |
[in] | bPrepended | If this is true, a shearing matrix is multiplied at left side, or at right side. |
Transform a point.
[in,out] | x | The input x-coordinate of the point, and It receives the output transformed x-coordinate. |
[in,out] | y | The input y-coordinate of the point, and It receives the output transformed y-coordinate. |
Transform a point.
[in] | x | The input x-coordinate of the point. |
[in] | y | The input y-coordinate of the point. |
[out] | x1 | It receives the output transformed x-coordinate. |
[out] | y1 | It receives the output transformed y-coordinate. |
Transform distance specified by x and y value.
[in] | dx | The input x value. |
[in] | dy | The input y value. |
Transform distance specified by x and y value.
[in] | dx | The input x value. |
[in] | dy | The input y value. |
Transform a distance.
[in] | distance | The input distance. |
void CFX_Matrix::TransformParallelogram | ( | CFX_ParallelogramF & | pg | ) | const |
Transform a parallelogram.
[in,out] | pg | The input parallelogram, and it receives the output transformed parallelogram. |
void CFX_Matrix::TransformParallelogram | ( | CFX_Parallelogram & | pg | ) | const |
Transform a parallelogram.
[in,out] | pg | The input parallelogram, and it receives the output transformed parallelogram. |
Transform point specified by x and y value.
[in,out] | x | The input x-coordinate of the point, and it receives the output transformed x-coordinate. |
[in,out] | y | The input y-coordinate of the point, and it receives the output transformed y-coordinate. |
Transform point specified by x and y value.
[in,out] | x | The input x-coordinate of the point, and it receives the output transformed x-coordinate. |
[in,out] | y | The input y-coordinate of the point, and it receives the output transformed y-coordinate. |
void CFX_Matrix::TransformPoints | ( | CFX_PointF * | points, |
FX_INT32 | iCount | ||
) | const |
Transform points.
[in,out] | points | The input a array of the points, and it receives the output array of the transformed points. |
[in] | iCount | The input count of the points. |
Transform points.
[in,out] | points | The input a array of the points, and it receives the output array of the transformed points. |
[in] | iCount | The input count of the points. |
void CFX_Matrix::TransformRect | ( | CFX_RectF & | rect | ) | const |
Transform a rectangle and return a bounding rectangle. The result rectangle is always normalized: left <= right, and top <= bottom.
[in,out] | rect | The input rectangle, and it receives the output transformed rectangle. |
void CFX_Matrix::TransformRect | ( | CFX_Rect & | rect | ) | const |
Transform a rectangle and return a bounding rectangle. The result rectangle is always normalized: left <= right, and top <= bottom.
[in,out] | rect | The input rectangle, and it receives the output transformed rectangle. |
void CFX_Matrix::TransformRect | ( | FX_FLOAT & | left, |
FX_FLOAT & | right, | ||
FX_FLOAT & | top, | ||
FX_FLOAT & | bottom | ||
) | const |
Transform a rectangle and return a bounding rectangle. The result rectangle is always normalized: left <= right, and bottom <= top.
[in,out] | left | The input x-coordinate of the left-bottom corner, and it receives the output transformed and normalized x-coordinate. |
[in,out] | right | The input x-coordinate of the right-top corner, and it receives the output transformed and normalized x-coordinate. |
[in,out] | top | The input y-coordinate of the right-top corner, and it receives the output transformed and normalized y-coordinate. |
[in,out] | bottom | The input y-coordinate of the left-bottom corner, and it receives the output transformed and normalized y-coordinate. |
|
inline |
Transform a rectangle and return a bounding rectangle. The result rectangle is always normalized: left <= right, and bottom <= top.
[in,out] | rect | The input rectangle, and it receives the output transformed and normalized rectangle. |
void CFX_Matrix::TransformRect | ( | FX_RECT & | rect | ) | const |
Transform a rectangle and return a bounding rectangle. The result rectangle is always normalized: left <= right, and bottom <= top.
[in,out] | rect | The input rectangle, and it receives the output transformed and normalized rectangle. |
void CFX_Matrix::TransformRoundRect | ( | CFX_RoundRectF & | rr | ) | const |
Transform a round rectangle.
[in,out] | rr | The input round rectangle, and it receives the output transformed round rectangle. |
void CFX_Matrix::TransformRoundRect | ( | CFX_RoundRect & | rr | ) | const |
Transform a round rectangle.
[in,out] | rr | The input round rectangle, and it receives the output transformed round rectangle. |
void CFX_Matrix::TransformVector | ( | CFX_VectorF & | v | ) | const |
Transform a vector.
[in,out] | v | The input vector, and it receives the output transformed vector. |
void CFX_Matrix::TransformVector | ( | CFX_Vector & | v | ) | const |
Transform a vector.
[in,out] | v | The input vector, and it receives the output transformed vector. |
Transform a x-distance.
[in] | dx | The input x-distance. |
Transform a x-distance.
[in] | dx | The input x-distance. |
Transform a y-distance.
[in] | dy | The input y-distance. |
Transform a y-distance.
[in] | dy | The input y-distance. |
Translate the matrix.
[in] | x | The x-direction delta value. |
[in] | y | The y-direction delta value. |
[in] | bPrepended | If this is true, a translation matrix is multiplied at left side, or at right side. |
Translate the matrix. using integer value.
[in] | x | The x-direction delta integer value. |
[in] | y | The y-direction delta integer value. |
[in] | bPrepended | If this is true, a translation matrix is multiplied at left side, or at right side. |