Public Member Functions | |
Matrix2D () | |
Construct a identity transformation matrix. | |
Matrix2D (float a1, float b1, float c1, float d1, float e1, float f1) | |
Construct a matrix with six input coefficients. More... | |
void | concat (float a, float b, float c, float d, float e, float f, boolean bPrepended) |
Concatenate with another matrix. More... | |
void | concat (Matrix2D m, boolean bPrepended) |
Concatenate with another matrix. More... | |
void | concatInverse (Matrix2D m, boolean bPrepended) |
Concatenate the inverse of another matrix. More... | |
void | copy (Matrix2D m) |
Copy coefficients from another matrix. More... | |
float | getA () |
Get the coefficient a. More... | |
float | getB () |
Get the coefficient b. More... | |
float | getC () |
Get the coefficient c. More... | |
float | getD () |
Get the coefficient d. More... | |
float | getE () |
Get the coefficient e. More... | |
float | getF () |
Get the coefficient f. More... | |
float | getUnitArea () |
Get area of the parallelogram composing two unit vectors. More... | |
RectF | getUnitRect () |
Get a bounding rectangle of the parallelogram composing two unit vectors. More... | |
float | getXUnit () |
Get the x-direction unit size. More... | |
float | getYUnit () |
Get the y-direction unit size. More... | |
boolean | is90Rotated () |
Whether this matrix has rotating of 90, or -90 degrees. More... | |
boolean | isIdentity () |
Determine whether a matrix is an identity transformation or not. More... | |
boolean | isInvertible () |
Determine whether a matrix is invertible or not. More... | |
boolean | isScaled () |
Whether this matrix has scaling (or translating) only. No rotating. More... | |
void | matchRect (RectF dest, RectF src) |
Get a matrix that transforms a source rectangle to dest rectangle. More... | |
void | reset () |
Reset current matrix. More... | |
void | rotate (float fRadian, boolean bPrepended) |
Rotate the matrix. More... | |
void | rotateAt (float fRadian, float x, float y, boolean bPrepended) |
Rotate the matrix at a position. More... | |
void | scale (float sx, float sy, boolean bPrepended) |
Scale the matrix. More... | |
void | set (float a, float b, float c, float d, float e, float f) |
Change the coefficients in the matrix. More... | |
void | set (float[] n) |
Change the coefficients in the matrix. More... | |
void | setA (float value) |
Set the coefficient a. More... | |
void | setB (float value) |
Set the coefficient b. More... | |
void | setC (float value) |
Set the coefficient c. More... | |
void | setD (float value) |
Set the coefficient d. More... | |
void | setE (float value) |
Set the coefficient e. More... | |
void | setF (float value) |
Set the coefficient f. More... | |
void | setIdentity () |
Set the matrix to be an identity transformation matrix. More... | |
void | setReverse (Matrix2D m) |
Set the coefficients of the inverse of another matrix to this matrix. More... | |
void | shear (float fAlphaRadian, float fBetaRadian, boolean bPrepended) |
Shear the matrix. More... | |
float | transformDistance (float distance) |
Transform a distance. More... | |
void | transformRect (RectF rect) |
Transform a rectangle and return a bounding rectangle. The result rectangle is always normalized. More... | |
void | transformRect (RectI rect) |
Transform a rectangle and return a bounding rectangle. The result rectangle is always normalized. More... | |
void | translate (float x, float y, boolean bPrepended) |
Translate the matrix. More... | |
void | translateI (int x, int y, boolean bPrepended) |
Translate the matrix. using integer value. More... | |
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;
com.foxit.sdk.common.fxcrt.Matrix2D.Matrix2D | ( | float | a1, |
float | b1, | ||
float | c1, | ||
float | d1, | ||
float | e1, | ||
float | f1 | ||
) |
Construct a matrix with six input coefficients.
a1 | The input coefficient a. |
b1 | The input coefficient b. |
c1 | The input coefficient c. |
d1 | The input coefficient d. |
e1 | The input coefficient e. |
f1 | The input coefficient f. |
void com.foxit.sdk.common.fxcrt.Matrix2D.concat | ( | float | a, |
float | b, | ||
float | c, | ||
float | d, | ||
float | e, | ||
float | f, | ||
boolean | bPrepended | ||
) |
Concatenate with another matrix.
a | The coefficient a of the input matrix. |
b | The coefficient b of the input matrix. |
c | The coefficient c of the input matrix. |
d | The coefficient d of the input matrix. |
e | The coefficient e of the input matrix. |
f | The coefficient f of the input matrix. |
bPrepended |
void com.foxit.sdk.common.fxcrt.Matrix2D.concat | ( | Matrix2D | m, |
boolean | bPrepended | ||
) |
Concatenate with another matrix.
m | The input matrix. |
bPrepended |
void com.foxit.sdk.common.fxcrt.Matrix2D.concatInverse | ( | Matrix2D | m, |
boolean | bPrepended | ||
) |
Concatenate the inverse of another matrix.
m | The input matrix. |
bPrepended |
void com.foxit.sdk.common.fxcrt.Matrix2D.copy | ( | Matrix2D | m | ) |
Copy coefficients from another matrix.
m | The input matrix. |
float com.foxit.sdk.common.fxcrt.Matrix2D.getA | ( | ) |
Get the coefficient a.
float com.foxit.sdk.common.fxcrt.Matrix2D.getB | ( | ) |
Get the coefficient b.
float com.foxit.sdk.common.fxcrt.Matrix2D.getC | ( | ) |
Get the coefficient c.
float com.foxit.sdk.common.fxcrt.Matrix2D.getD | ( | ) |
Get the coefficient d.
float com.foxit.sdk.common.fxcrt.Matrix2D.getE | ( | ) |
Get the coefficient e.
float com.foxit.sdk.common.fxcrt.Matrix2D.getF | ( | ) |
Get the coefficient f.
float com.foxit.sdk.common.fxcrt.Matrix2D.getUnitArea | ( | ) |
Get area of the parallelogram composing two unit vectors.
RectF com.foxit.sdk.common.fxcrt.Matrix2D.getUnitRect | ( | ) |
Get a bounding rectangle of the parallelogram composing two unit vectors.
float com.foxit.sdk.common.fxcrt.Matrix2D.getXUnit | ( | ) |
Get the x-direction unit size.
float com.foxit.sdk.common.fxcrt.Matrix2D.getYUnit | ( | ) |
Get the y-direction unit size.
boolean com.foxit.sdk.common.fxcrt.Matrix2D.is90Rotated | ( | ) |
Whether this matrix has rotating of 90, or -90 degrees.
boolean com.foxit.sdk.common.fxcrt.Matrix2D.isIdentity | ( | ) |
Determine whether a matrix is an identity transformation or not.
boolean com.foxit.sdk.common.fxcrt.Matrix2D.isInvertible | ( | ) |
Determine whether a matrix is invertible or not.
boolean com.foxit.sdk.common.fxcrt.Matrix2D.isScaled | ( | ) |
Whether this matrix has scaling (or translating) only. No rotating.
Get a matrix that transforms a source rectangle to dest rectangle.
dest | The dest rectangle. |
src | The source rectangle. |
void com.foxit.sdk.common.fxcrt.Matrix2D.reset | ( | ) |
Reset current matrix.
void com.foxit.sdk.common.fxcrt.Matrix2D.rotate | ( | float | fRadian, |
boolean | bPrepended | ||
) |
Rotate the matrix.
fRadian | Rotation angle in radian. |
bPrepended | If it's TRUE, a rotation matrix is multiplied at left side, or at right side. |
void com.foxit.sdk.common.fxcrt.Matrix2D.rotateAt | ( | float | fRadian, |
float | x, | ||
float | y, | ||
boolean | bPrepended | ||
) |
Rotate the matrix at a position.
fRadian | Rotation angle in radian. |
x | The x coordinate from which to rotate. |
y | The y coordinate from which to rotate. |
bPrepended | If this is TRUE, a rotation matrix is multiplied at left side, or at right side. |
void com.foxit.sdk.common.fxcrt.Matrix2D.scale | ( | float | sx, |
float | sy, | ||
boolean | bPrepended | ||
) |
Scale the matrix.
sx | The x-direction scale coefficient. |
sy | The y-direction scale coefficient. |
bPrepended | If this is TRUE, a scaling matrix is multiplied at left side, or at right side. |
void com.foxit.sdk.common.fxcrt.Matrix2D.set | ( | float | a, |
float | b, | ||
float | c, | ||
float | d, | ||
float | e, | ||
float | f | ||
) |
Change the coefficients in the matrix.
a | The input coefficient a. |
b | The input coefficient b. |
c | The input coefficient c. |
d | The input coefficient d. |
e | The input coefficient e. |
f | The input coefficient f. |
void com.foxit.sdk.common.fxcrt.Matrix2D.set | ( | float [] | n | ) |
Change the coefficients in the matrix.
n | The input coefficient array. |
com.foxit.sdk.common.fxcrt.Matrix2D.setA | ( | float | value | ) |
Set the coefficient a.
[in] | a | The coefficient a. |
com.foxit.sdk.common.fxcrt.Matrix2D.setB | ( | float | value | ) |
Set the coefficient b.
[in] | b | The coefficient b. |
com.foxit.sdk.common.fxcrt.Matrix2D.setC | ( | float | value | ) |
Set the coefficient c.
[in] | c | The coefficient c. |
com.foxit.sdk.common.fxcrt.Matrix2D.setD | ( | float | value | ) |
Set the coefficient d.
[in] | d | The coefficient d. |
com.foxit.sdk.common.fxcrt.Matrix2D.setE | ( | float | value | ) |
Set the coefficient e.
[in] | e | The coefficient e. |
com.foxit.sdk.common.fxcrt.Matrix2D.setF | ( | float | value | ) |
Set the coefficient f.
[in] | f | The coefficient f. |
void com.foxit.sdk.common.fxcrt.Matrix2D.setIdentity | ( | ) |
Set the matrix to be an identity transformation matrix.
void com.foxit.sdk.common.fxcrt.Matrix2D.setReverse | ( | Matrix2D | m | ) |
Set the coefficients of the inverse of another matrix to this matrix.
m | The input matrix. |
void com.foxit.sdk.common.fxcrt.Matrix2D.shear | ( | float | fAlphaRadian, |
float | fBetaRadian, | ||
boolean | bPrepended | ||
) |
Shear the matrix.
fAlphaRadian | Shearing angle of x axis. |
fBetaRadian | Shearing angle of y axis. |
bPrepended | If this is TRUE, a shearing matrix is multiplied at left side, or at right side. |
float com.foxit.sdk.common.fxcrt.Matrix2D.transformDistance | ( | float | distance | ) |
Transform a distance.
distance | The input distance. |
void com.foxit.sdk.common.fxcrt.Matrix2D.transformRect | ( | RectF | rect | ) |
Transform a rectangle and return a bounding rectangle. The result rectangle is always normalized.
rect | The input rectangle, and it receives the output transformed and normalized rectangle. |
void com.foxit.sdk.common.fxcrt.Matrix2D.transformRect | ( | RectI | rect | ) |
Transform a rectangle and return a bounding rectangle. The result rectangle is always normalized.
rect | The input rectangle, and it receives the output transformed and normalized rectangle. |
void com.foxit.sdk.common.fxcrt.Matrix2D.translate | ( | float | x, |
float | y, | ||
boolean | bPrepended | ||
) |
Translate the matrix.
x | The x-direction delta value. |
y | The y-direction delta value. |
bPrepended | If this is TRUE, a translation matrix is multiplied at left side, or at right side. |
void com.foxit.sdk.common.fxcrt.Matrix2D.translateI | ( | int | x, |
int | y, | ||
boolean | bPrepended | ||
) |
Translate the matrix. using integer value.
x | The x-direction delta integer value. |
y | The y-direction delta integer value. |
bPrepended | If this is TRUE, a translation matrix is multiplied at left side, or at right side. |