A rectangle (document coordinates).
More...
#include <SignDocSDK-cpp.h>
|
| Rect () |
| Constructor. More...
|
|
| Rect (double aX1, double aY1, double aX2, double aY2) |
| Constructor. More...
|
|
| Rect (const Rect &aSource) |
| Copy constructor. More...
|
|
| ~Rect () |
| Destructor. More...
|
|
void | get (double &aX1, double &aY1, double &aX2, double &aY2) const |
| Get the coordinates of the rectangle. More...
|
|
void | set (double aX1, double aY1, double aX2, double aY2) |
| Set the coordinates of the rectangle. More...
|
|
double | getWidth () const |
| Get the width of the rectangle. More...
|
|
double | getHeight () const |
| Get the height of the rectangle. More...
|
|
void | normalize () |
| Normalize the rectangle. More...
|
|
void | scale (double aFactor) |
| Scale the rectangle. More...
|
|
void | scale (double aFactorX, double aFactorY) |
| Scale the rectangle. More...
|
|
bool | isEmpty () const |
| Check if the rectangle is empty. More...
|
|
void | intersectWith (const Rect &aOther) |
| Intersect this rectangle with another one. More...
|
|
void | uniteWith (const Rect &aOther) |
| Unite this rectangle with another one. More...
|
|
double | getX1 () const |
| Get the first X coordinate. More...
|
|
double | getY1 () const |
| Get the first Y coordinate. More...
|
|
double | getX2 () const |
| Get the second X coordinate. More...
|
|
double | getY2 () const |
| Get the second Y coordinate. More...
|
|
A rectangle (document coordinates).
If coordinates are given in pixels (this is true for TIFF documents), the right and top coordinates are exclusive.
The edges of the rectangle are parallel to the axes.
See Coordinate Systems.
Constructor.
All coordinates will be 0.
Rect |
( |
double |
aX1, |
|
|
double |
aY1, |
|
|
double |
aX2, |
|
|
double |
aY2 |
|
) |
| |
|
inline |
Constructor.
- Parameters
-
[in] | aX1 | The first X coordinate. |
[in] | aY1 | The first Y coordinate. |
[in] | aX2 | The second X coordinate. |
[in] | aY2 | The second Y coordinate. |
Copy constructor.
- Parameters
-
[in] | aSource | The object to be copied. |
void get |
( |
double & |
aX1, |
|
|
double & |
aY1, |
|
|
double & |
aX2, |
|
|
double & |
aY2 |
|
) |
| const |
|
inline |
Get the coordinates of the rectangle.
- Parameters
-
[out] | aX1 | The first X coordinate. |
[out] | aY1 | The first Y coordinate. |
[out] | aX2 | The second X coordinate. |
[out] | aY2 | The second Y coordinate. |
double getHeight |
( |
| ) |
const |
|
inline |
Get the height of the rectangle.
- Returns
- The height of the rectangle.
double getWidth |
( |
| ) |
const |
|
inline |
Get the width of the rectangle.
- Returns
- The width of the rectangle.
Get the first X coordinate.
Get the second X coordinate.
Get the first Y coordinate.
Get the second Y coordinate.
void intersectWith |
( |
const Rect & |
aOther | ) |
|
|
inline |
Intersect this rectangle with another one.
If either rectangle is empty, this rectangle will be empty. The resulting rectangle will be normalized.
- Parameters
-
[in] | aOther | The other rectangle. |
- See also
- isEmpty(), uniteWith()
Check if the rectangle is empty.
A rectangle is empty if the two X coordinates are equal or if the two Y coordinates are equal.
- Returns
- true iff the rectangle is empty.
Normalize the rectangle.
Normalize the rectangle to the one with lower-left and upper-right corners assuming that the origin is in the lower-left corner of the page, see Coordinate Systems.
void scale |
( |
double |
aFactor | ) |
|
|
inline |
Scale the rectangle.
- Parameters
-
[in] | aFactor | The factor by which the rectangle is to be scaled. |
void scale |
( |
double |
aFactorX, |
|
|
double |
aFactorY |
|
) |
| |
|
inline |
Scale the rectangle.
- Parameters
-
[in] | aFactorX | The factor by which the rectangle is to be scaled horizontally. |
[in] | aFactorY | The factor by which the rectangle is to be scaled vertically. |
void set |
( |
double |
aX1, |
|
|
double |
aY1, |
|
|
double |
aX2, |
|
|
double |
aY2 |
|
) |
| |
|
inline |
Set the coordinates of the rectangle.
- Parameters
-
[in] | aX1 | The first X coordinate. |
[in] | aY1 | The first Y coordinate. |
[in] | aX2 | The second X coordinate. |
[in] | aY2 | The second Y coordinate. |
void uniteWith |
( |
const Rect & |
aOther | ) |
|
|
inline |
Unite this rectangle with another one.
Replace this rectangle with the smallest rectangle that contains both retangles.
If this rectangle is empty, it will be set to aOther. If aOther is empty, this rectangle won't be modified. The resulting rectangle will be normalized.
- Parameters
-
[in] | aOther | The other rectangle. |
- See also
- intersectWith(), isEmpty()
The documentation for this class was generated from the following file: