SignDoc SDK (C)
5.0.0
|
A rectangle (document coordinates). More...
#include <SignDocSDK-c.h>
Public Member Functions | |
struct SIGNDOC_Rect * | SIGNDOC_Rect_new (struct SIGNDOC_Exception **aEx) |
SIGNDOC_Rect constructor. More... | |
struct SIGNDOC_Rect * | SIGNDOC_Rect_newXY (struct SIGNDOC_Exception **aEx, double aX1, double aY1, double aX2, double aY2) |
SIGNDOC_Rect constructor. More... | |
struct SIGNDOC_Rect * | SIGNDOC_Rect_clone (struct SIGNDOC_Exception **aEx, const struct SIGNDOC_Rect *aObj) |
Clone a SIGNDOC_Rect object. More... | |
void | SIGNDOC_Rect_delete (struct SIGNDOC_Rect *aObj) |
SIGNDOC_Rect destructor. More... | |
void | SIGNDOC_Rect_get (const struct SIGNDOC_Rect *aObj, double *aX1, double *aY1, double *aX2, double *aY2) |
Get the four coordinate of a SIGNDOC_Rect object. More... | |
void | SIGNDOC_Rect_assign (struct SIGNDOC_Rect *aObj, const struct SIGNDOC_Rect *aSource) |
SIGNDOC_Rect assignment operator. More... | |
void | SIGNDOC_Rect_setXY (struct SIGNDOC_Rect *aObj, double aX1, double aY1, double aX2, double aY2) |
Set the coordinates of a SIGNDOC_Rect object. More... | |
double | SIGNDOC_Rect_getX1 (const struct SIGNDOC_Rect *aObj) |
Get the first X coordinate of a SIGNDOC_Rect object. More... | |
double | SIGNDOC_Rect_getY1 (const struct SIGNDOC_Rect *aObj) |
Get the first Y coordinate of a SIGNDOC_Rect object. More... | |
double | SIGNDOC_Rect_getX2 (const struct SIGNDOC_Rect *aObj) |
Get the second X coordinate of a SIGNDOC_Rect object. More... | |
double | SIGNDOC_Rect_getY2 (const struct SIGNDOC_Rect *aObj) |
Get the second Y coordinate of a SIGNDOC_Rect object. More... | |
double | SIGNDOC_Rect_getWidth (const struct SIGNDOC_Rect *aObj) |
Get the width of the rectangle. More... | |
double | SIGNDOC_Rect_getHeight (const struct SIGNDOC_Rect *aObj) |
Get the height of the rectangle. More... | |
void | SIGNDOC_Rect_normalize (struct SIGNDOC_Rect *aObj) |
Normalize the rectangle. More... | |
void | SIGNDOC_Rect_scale (struct SIGNDOC_Rect *aObj, double aFactor) |
Scale the rectangle. More... | |
void | SIGNDOC_Rect_scaleXY (struct SIGNDOC_Rect *aObj, double aFactorX, double aFactorY) |
Scale the rectangle. More... | |
SIGNDOC_Boolean | SIGNDOC_Rect_isEmpty (const struct SIGNDOC_Rect *aObj) |
Check if the rectangle is empty. More... | |
void | SIGNDOC_Rect_intersectWith (struct SIGNDOC_Rect *aObj, const struct SIGNDOC_Rect *aOther) |
Intersect this rectangle with another one. More... | |
void | SIGNDOC_Rect_uniteWith (struct SIGNDOC_Rect *aObj, const struct SIGNDOC_Rect *aOther) |
Unite this rectangle with another one. More... | |
Public Attributes | |
double | mX1 |
The first X coordinate. More... | |
double | mY1 |
The first Y coordinate. More... | |
double | mX2 |
The second X coordinate. More... | |
double | mY2 |
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.
See Coordinate Systems.
The edges of the rectangle are parallel to the axes.
void SIGNDOC_Rect_assign | ( | struct SIGNDOC_Rect * | aObj, |
const struct SIGNDOC_Rect * | aSource | ||
) |
SIGNDOC_Rect assignment operator.
[in] | aObj | A pointer to the SIGNDOC_Rect object. |
[in] | aSource | A pointer to the source SIGNDOC_Rect object. |
struct SIGNDOC_Rect * SIGNDOC_Rect_clone | ( | struct SIGNDOC_Exception ** | aEx, |
const struct SIGNDOC_Rect * | aObj | ||
) |
Clone a SIGNDOC_Rect object.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Rect object. |
void SIGNDOC_Rect_delete | ( | struct SIGNDOC_Rect * | aObj | ) |
SIGNDOC_Rect destructor.
[in] | aObj | A pointer to the SIGNDOC_Rect object. |
void SIGNDOC_Rect_get | ( | const struct SIGNDOC_Rect * | aObj, |
double * | aX1, | ||
double * | aY1, | ||
double * | aX2, | ||
double * | aY2 | ||
) |
Get the four coordinate of a SIGNDOC_Rect object.
[in] | aObj | A pointer to the SIGNDOC_Rect object. |
[out] | aX1 | A pointer to an object that will receive the first X coordinate. |
[out] | aY1 | A pointer to an object that will receive the first Y coordinate. |
[out] | aX2 | A pointer to an object that will receive the second X coordinate. |
[out] | aY2 | A pointer to an object that will receive the second Y coordinate. |
double SIGNDOC_Rect_getHeight | ( | const struct SIGNDOC_Rect * | aObj | ) |
Get the height of the rectangle.
[in] | aObj | A pointer to the SIGNDOC_Rect object. |
double SIGNDOC_Rect_getWidth | ( | const struct SIGNDOC_Rect * | aObj | ) |
Get the width of the rectangle.
[in] | aObj | A pointer to the SIGNDOC_Rect object. |
double SIGNDOC_Rect_getX1 | ( | const struct SIGNDOC_Rect * | aObj | ) |
Get the first X coordinate of a SIGNDOC_Rect object.
[in] | aObj | A pointer to the SIGNDOC_Rect object. |
double SIGNDOC_Rect_getX2 | ( | const struct SIGNDOC_Rect * | aObj | ) |
Get the second X coordinate of a SIGNDOC_Rect object.
[in] | aObj | A pointer to the SIGNDOC_Rect object. |
double SIGNDOC_Rect_getY1 | ( | const struct SIGNDOC_Rect * | aObj | ) |
Get the first Y coordinate of a SIGNDOC_Rect object.
[in] | aObj | A pointer to the SIGNDOC_Rect object. |
double SIGNDOC_Rect_getY2 | ( | const struct SIGNDOC_Rect * | aObj | ) |
Get the second Y coordinate of a SIGNDOC_Rect object.
[in] | aObj | A pointer to the SIGNDOC_Rect object. |
void SIGNDOC_Rect_intersectWith | ( | struct SIGNDOC_Rect * | aObj, |
const struct SIGNDOC_Rect * | aOther | ||
) |
Intersect this rectangle with another one.
If either rectangle is empty, this rectangle will be empty. The resulting rectangle will be normalized.
[in] | aObj | A pointer to the SIGNDOC_Rect object. |
[in] | aOther | A pointer to the other SIGNDOC_Rect object. |
SIGNDOC_Boolean SIGNDOC_Rect_isEmpty | ( | const struct SIGNDOC_Rect * | aObj | ) |
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.
[in] | aObj | A pointer to the SIGNDOC_Rect object. |
struct SIGNDOC_Rect * SIGNDOC_Rect_new | ( | struct SIGNDOC_Exception ** | aEx | ) |
SIGNDOC_Rect constructor.
All coordinates will be 0.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
struct SIGNDOC_Rect * SIGNDOC_Rect_newXY | ( | struct SIGNDOC_Exception ** | aEx, |
double | aX1, | ||
double | aY1, | ||
double | aX2, | ||
double | aY2 | ||
) |
SIGNDOC_Rect constructor.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[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 SIGNDOC_Rect_normalize | ( | struct SIGNDOC_Rect * | aObj | ) |
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.
This function assumes that document coordinates are used, see Coordinate Systems).
[in] | aObj | A pointer to the SIGNDOC_Rect object. |
void SIGNDOC_Rect_scale | ( | struct SIGNDOC_Rect * | aObj, |
double | aFactor | ||
) |
Scale the rectangle.
[in] | aObj | A pointer to the SIGNDOC_Rect object. |
[in] | aFactor | The factor by which the rectangle is to be scaled. |
void SIGNDOC_Rect_scaleXY | ( | struct SIGNDOC_Rect * | aObj, |
double | aFactorX, | ||
double | aFactorY | ||
) |
Scale the rectangle.
[in] | aObj | A pointer to the SIGNDOC_Rect object. |
[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 SIGNDOC_Rect_setXY | ( | struct SIGNDOC_Rect * | aObj, |
double | aX1, | ||
double | aY1, | ||
double | aX2, | ||
double | aY2 | ||
) |
Set the coordinates of a SIGNDOC_Rect object.
[in] | aObj | A pointer to the SIGNDOC_Rect object. |
[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 SIGNDOC_Rect_uniteWith | ( | struct SIGNDOC_Rect * | aObj, |
const struct SIGNDOC_Rect * | aOther | ||
) |
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.
[in] | aObj | A pointer to the SIGNDOC_Rect object. |
[in] | aOther | A pointer to the other SIGNDOC_Rect object. |
double mX1 |
The first X coordinate.
double mX2 |
The second X coordinate.
double mY1 |
The first Y coordinate.
double mY2 |
The second Y coordinate.