Public Member Functions | |
RectF () | |
Construct an empty rectangle. | |
RectF (float left1, float bottom1, float right1, float top1) | |
Construct a rectangle with left-bottom and right-top corners. More... | |
RectF (RectI rect) | |
Construct a rectangle with a FX_RECT object. More... | |
boolean | contains (RectF other_rect) |
Check if current rectangle fully contains the other provided rectangle. That means to check if the other rectangle is fully inside current one. More... | |
boolean | contains (float x, float y) |
Check if current rectangle fully contains the provided point. That means to check if the provided point is inside current rectangle. More... | |
void | deflate (float x, float y) |
Decreases the width and height of the rectangle. More... | |
void | deflate (float left, float bottom, float right, float top) |
Decreases the width and height of the rectangle. More... | |
void | deflate (RectF rt) |
Decreases the width and height of the rectangle. More... | |
float | getBottom () |
Get the bottom. More... | |
RectI | getClosestRect () |
Get a closest integer rectangle. More... | |
RectI | getInnerRect () |
Convert to an inner integer rectangle. More... | |
float | getLeft () |
Get the left. More... | |
RectI | getOuterRect () |
Convert to an outer integer rectangle. More... | |
float | getRight () |
Get the right. More... | |
float | getTop () |
Get the top. More... | |
float | height () |
Get the height of the rectangle. More... | |
void | inflate (float x, float y) |
Increases the width and height of the rectangle. More... | |
void | inflate (float left, float bottom, float right, float top) |
Increases the width and height of the rectangle. More... | |
void | inflate (RectF rt) |
Increases the width and height of the rectangle. More... | |
void | initRect (float x, float y) |
Initialize the rectangle to a single point. More... | |
void | intersect (RectF other_rect) |
Intersect with a rect. More... | |
boolean | isEmpty () |
Verify whether the rect is empty. More... | |
void | normalize () |
Normalize the rect. Make sure left <= right, and bottom <= top. More... | |
void | reset () |
Reset rectangle, set coordinates to 0. More... | |
void | setBottom (float value) |
Set the bottom. More... | |
void | setLeft (float value) |
Set the left. More... | |
void | setRight (float value) |
Set the right. More... | |
void | setTop (float value) |
Set the top. More... | |
void | transform (Matrix2D pMatrix) |
Transform a rectangle. The result rectangle is always normalized. More... | |
void | translate (float e, float f) |
Translate rectangle. More... | |
void | union (RectF other_rect) |
Union with a rect. More... | |
void | updateRect (float x, float y) |
Update the rectangle to contain the specified point. More... | |
float | width () |
Get the width of the rectangle. More... | |
Static Public Member Functions | |
static RectF | getBBox (PointF pPoints, int nPoints) |
Get the bounding box of input points array. More... | |
A float-point coordination rectangle. A normalized float-point rectangle always has top larger than bottom, which is the opposite of Windows rectangle.
com.foxit.sdk.common.fxcrt.RectF.RectF | ( | float | left1, |
float | bottom1, | ||
float | right1, | ||
float | top1 | ||
) |
Construct a rectangle with left-bottom and right-top corners.
[in] | left1 | The x-coordinate of the input left-bottom corner. |
[in] | bottom1 | The y-coordinate of the input left-bottom corner. |
[in] | right1 | The x-coordinate of the input right-top corner. |
[in] | top1 | The y-coordinate of the input right-top corner. |
com.foxit.sdk.common.fxcrt.RectF.RectF | ( | RectI | rect | ) |
Construct a rectangle with a FX_RECT object.
[in] | rect | The input FX_RECT object. |
boolean com.foxit.sdk.common.fxcrt.RectF.contains | ( | RectF | other_rect | ) |
Check if current rectangle fully contains the other provided rectangle. That means to check if the other rectangle is fully inside current one.
[in] | other_rect | The other provided rect. |
boolean com.foxit.sdk.common.fxcrt.RectF.contains | ( | float | x, |
float | y | ||
) |
Check if current rectangle fully contains the provided point. That means to check if the provided point is inside current rectangle.
[in] | x | The x coordinate of the provided point. |
[in] | y | The y coordinate of the provided point. |
void com.foxit.sdk.common.fxcrt.RectF.deflate | ( | float | x, |
float | y | ||
) |
Decreases the width and height of the rectangle.
[in] | x | The number to deflate the left and right of the rectangle. |
[in] | y | The number to deflate the top and bottom of the rectangle. |
void com.foxit.sdk.common.fxcrt.RectF.deflate | ( | float | left, |
float | bottom, | ||
float | right, | ||
float | top | ||
) |
Decreases the width and height of the rectangle.
[in] | left | The number to deflate the left of the rectangle. |
[in] | bottom | The number to deflate the bottom of the rectangle. |
[in] | right | The number to deflate the right of the rectangle. |
[in] | top | The number to deflate the top of the rectangle. |
void com.foxit.sdk.common.fxcrt.RectF.deflate | ( | RectF | rt | ) |
Decreases the width and height of the rectangle.
[in] | rt | The rectangle to deflate each side. |
|
static |
Get the bounding box of input points array.
[in] | pPoints | The input points array. |
[in] | nPoints | The number of points in the array. |
com.foxit.sdk.common.fxcrt.RectF.getBottom | ( | ) |
Get the bottom.
RectI com.foxit.sdk.common.fxcrt.RectF.getClosestRect | ( | ) |
Get a closest integer rectangle.
RectI com.foxit.sdk.common.fxcrt.RectF.getInnerRect | ( | ) |
Convert to an inner integer rectangle.
com.foxit.sdk.common.fxcrt.RectF.getLeft | ( | ) |
Get the left.
RectI com.foxit.sdk.common.fxcrt.RectF.getOuterRect | ( | ) |
Convert to an outer integer rectangle.
com.foxit.sdk.common.fxcrt.RectF.getRight | ( | ) |
Get the right.
com.foxit.sdk.common.fxcrt.RectF.getTop | ( | ) |
Get the top.
float com.foxit.sdk.common.fxcrt.RectF.height | ( | ) |
Get the height of the rectangle.
void com.foxit.sdk.common.fxcrt.RectF.inflate | ( | float | x, |
float | y | ||
) |
Increases the width and height of the rectangle.
[in] | x | The number to inflate the left and right of the rectangle. |
[in] | y | The number to inflate the top and bottom of the rectangle. |
void com.foxit.sdk.common.fxcrt.RectF.inflate | ( | float | left, |
float | bottom, | ||
float | right, | ||
float | top | ||
) |
Increases the width and height of the rectangle.
[in] | left | The number to inflate the left of the rectangle. |
[in] | bottom | The number to inflate the bottom of the rectangle. |
[in] | right | The number to inflate the right of the rectangle. |
[in] | top | The number to inflate the top of the rectangle. |
void com.foxit.sdk.common.fxcrt.RectF.inflate | ( | RectF | rt | ) |
Increases the width and height of the rectangle.
[in] | rt | The rectangle to inflate each side. |
void com.foxit.sdk.common.fxcrt.RectF.initRect | ( | float | x, |
float | y | ||
) |
Initialize the rectangle to a single point.
[in] | x | The x-coordinate of the input point. |
[in] | y | The y-coordinate of the input point. |
void com.foxit.sdk.common.fxcrt.RectF.intersect | ( | RectF | other_rect | ) |
Intersect with a rect.
[in] | other_rect | The rect to intersect with. |
boolean com.foxit.sdk.common.fxcrt.RectF.isEmpty | ( | ) |
Verify whether the rect is empty.
void com.foxit.sdk.common.fxcrt.RectF.normalize | ( | ) |
Normalize the rect. Make sure left <= right, and bottom <= top.
void com.foxit.sdk.common.fxcrt.RectF.reset | ( | ) |
Reset rectangle, set coordinates to 0.
com.foxit.sdk.common.fxcrt.RectF.setBottom | ( | float | value | ) |
Set the bottom.
[in] | value | The bottom. |
com.foxit.sdk.common.fxcrt.RectF.setLeft | ( | float | value | ) |
Set the left.
[in] | value | The left. |
com.foxit.sdk.common.fxcrt.RectF.setRight | ( | float | value | ) |
Set the right.
[in] | value | The right. |
com.foxit.sdk.common.fxcrt.RectF.setTop | ( | float | value | ) |
Set the top.
[in] | value | The top. |
void com.foxit.sdk.common.fxcrt.RectF.transform | ( | Matrix2D | pMatrix | ) |
Transform a rectangle. The result rectangle is always normalized.
[in] | pMatrix | The transformation matrix. |
void com.foxit.sdk.common.fxcrt.RectF.translate | ( | float | e, |
float | f | ||
) |
Translate rectangle.
[in] | e | Offset in X-axis. |
[in] | f | Offset in Y-axis. |
void com.foxit.sdk.common.fxcrt.RectF.union | ( | RectF | other_rect | ) |
Union with a rect.
[in] | other_rect | The rect to union with. |
void com.foxit.sdk.common.fxcrt.RectF.updateRect | ( | float | x, |
float | y | ||
) |
Update the rectangle to contain the specified point.
[in] | x | The x-coordinate of the input point. |
[in] | y | The y-coordinate of the input point. |
float com.foxit.sdk.common.fxcrt.RectF.width | ( | ) |
Get the width of the rectangle.