SignDoc SDK (C)
5.0.0
|
A rectangle for use with SIGNDOC_Image. More...
#include <SignDocSDK-c.h>
Public Member Functions | |
struct SIGNDOC_ImageRect * | SIGNDOC_ImageRect_new (struct SIGNDOC_Exception **aEx) |
SIGNDOC_ImageRect constructor. More... | |
struct SIGNDOC_ImageRect * | SIGNDOC_ImageRect_newXY (struct SIGNDOC_Exception **aEx, int aX1, int aY1, int aX2, int aY2) |
SIGNDOC_ImageRect constructor. More... | |
struct SIGNDOC_ImageRect * | SIGNDOC_ImageRect_clone (struct SIGNDOC_Exception **aEx, const struct SIGNDOC_ImageRect *aObj) |
Clone a SIGNDOC_ImageRect object. More... | |
void | SIGNDOC_ImageRect_delete (struct SIGNDOC_ImageRect *aObj) |
SIGNDOC_ImageRect destructor. More... | |
void | SIGNDOC_ImageRect_assign (struct SIGNDOC_ImageRect *aObj, const struct SIGNDOC_ImageRect *aSource) |
SIGNDOC_ImageRect assignment operator. More... | |
void | SIGNDOC_ImageRect_setXY (struct SIGNDOC_ImageRect *aObj, int aX1, int aY1, int aX2, int aY2) |
Set the coordinates of a SIGNDOC_ImageRect object. More... | |
int | SIGNDOC_ImageRect_getX1 (const struct SIGNDOC_ImageRect *aObj) |
Get the first X coordinate of a SIGNDOC_ImageRect object. More... | |
int | SIGNDOC_ImageRect_getY1 (const struct SIGNDOC_ImageRect *aObj) |
Get the first Y coordinate of a SIGNDOC_ImageRect object. More... | |
int | SIGNDOC_ImageRect_getX2 (const struct SIGNDOC_ImageRect *aObj) |
Get the second X coordinate of a SIGNDOC_ImageRect object. More... | |
int | SIGNDOC_ImageRect_getY2 (const struct SIGNDOC_ImageRect *aObj) |
Get the second Y coordinate of a SIGNDOC_ImageRect object. More... | |
int | SIGNDOC_ImageRect_getWidth (const struct SIGNDOC_ImageRect *aObj) |
Get the width of the rectangle. More... | |
int | SIGNDOC_ImageRect_getHeight (const struct SIGNDOC_ImageRect *aObj) |
Get the height of the rectangle. More... | |
void | SIGNDOC_ImageRect_normalize (struct SIGNDOC_ImageRect *aObj) |
Normalize the rectangle. More... | |
SIGNDOC_Boolean | SIGNDOC_ImageRect_isEmpty (const struct SIGNDOC_ImageRect *aObj) |
Check if the rectangle is empty. More... | |
void | SIGNDOC_ImageRect_intersectWith (struct SIGNDOC_ImageRect *aObj, const struct SIGNDOC_ImageRect *aOther) |
Intersect this rectangle with another one. More... | |
void | SIGNDOC_ImageRect_uniteWith (struct SIGNDOC_ImageRect *aObj, const struct SIGNDOC_ImageRect *aOther) |
Unite this rectangle with another one. More... | |
Public Attributes | |
int | mX1 |
The first X coordinate. More... | |
int | mY1 |
The first Y coordinate. More... | |
int | mX2 |
The second X coordinate. More... | |
int | mY2 |
The second Y coordinate. More... | |
A rectangle for use with SIGNDOC_Image.
The origin is in the upper left corner, the right and bottom coordinates are exclusive.
This class uses image coordinates, see Coordinate Systems.
The edges of the rectangle are parallel to the axes.
void SIGNDOC_ImageRect_assign | ( | struct SIGNDOC_ImageRect * | aObj, |
const struct SIGNDOC_ImageRect * | aSource | ||
) |
SIGNDOC_ImageRect assignment operator.
[in] | aObj | A pointer to the SIGNDOC_ImageRect object. |
[in] | aSource | A pointer to the source SIGNDOC_ImageRect object. |
struct SIGNDOC_ImageRect * SIGNDOC_ImageRect_clone | ( | struct SIGNDOC_Exception ** | aEx, |
const struct SIGNDOC_ImageRect * | aObj | ||
) |
Clone a SIGNDOC_ImageRect object.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_ImageRect object. |
void SIGNDOC_ImageRect_delete | ( | struct SIGNDOC_ImageRect * | aObj | ) |
SIGNDOC_ImageRect destructor.
[in] | aObj | A pointer to the SIGNDOC_ImageRect object. |
int SIGNDOC_ImageRect_getHeight | ( | const struct SIGNDOC_ImageRect * | aObj | ) |
Get the height of the rectangle.
[in] | aObj | A pointer to the SIGNDOC_ImageRect object. |
int SIGNDOC_ImageRect_getWidth | ( | const struct SIGNDOC_ImageRect * | aObj | ) |
Get the width of the rectangle.
[in] | aObj | A pointer to the SIGNDOC_ImageRect object. |
int SIGNDOC_ImageRect_getX1 | ( | const struct SIGNDOC_ImageRect * | aObj | ) |
Get the first X coordinate of a SIGNDOC_ImageRect object.
[in] | aObj | A pointer to the SIGNDOC_ImageRect object. |
int SIGNDOC_ImageRect_getX2 | ( | const struct SIGNDOC_ImageRect * | aObj | ) |
Get the second X coordinate of a SIGNDOC_ImageRect object.
[in] | aObj | A pointer to the SIGNDOC_ImageRect object. |
int SIGNDOC_ImageRect_getY1 | ( | const struct SIGNDOC_ImageRect * | aObj | ) |
Get the first Y coordinate of a SIGNDOC_ImageRect object.
[in] | aObj | A pointer to the SIGNDOC_ImageRect object. |
int SIGNDOC_ImageRect_getY2 | ( | const struct SIGNDOC_ImageRect * | aObj | ) |
Get the second Y coordinate of a SIGNDOC_ImageRect object.
[in] | aObj | A pointer to the SIGNDOC_ImageRect object. |
void SIGNDOC_ImageRect_intersectWith | ( | struct SIGNDOC_ImageRect * | aObj, |
const struct SIGNDOC_ImageRect * | 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_ImageRect object. |
[in] | aOther | A pointer to the other SIGNDOC_ImageRect object. |
SIGNDOC_Boolean SIGNDOC_ImageRect_isEmpty | ( | const struct SIGNDOC_ImageRect * | 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_ImageRect object. |
struct SIGNDOC_ImageRect * SIGNDOC_ImageRect_new | ( | struct SIGNDOC_Exception ** | aEx | ) |
SIGNDOC_ImageRect constructor.
All coordinates will be 0.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
struct SIGNDOC_ImageRect * SIGNDOC_ImageRect_newXY | ( | struct SIGNDOC_Exception ** | aEx, |
int | aX1, | ||
int | aY1, | ||
int | aX2, | ||
int | aY2 | ||
) |
SIGNDOC_ImageRect 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_ImageRect_normalize | ( | struct SIGNDOC_ImageRect * | aObj | ) |
Normalize the rectangle.
Normalize the rectangle to the one with upper-left and lower-right corners assuming that the origin is in the upper-left corner of the page.
[in] | aObj | A pointer to the SIGNDOC_ImageRect object. |
void SIGNDOC_ImageRect_setXY | ( | struct SIGNDOC_ImageRect * | aObj, |
int | aX1, | ||
int | aY1, | ||
int | aX2, | ||
int | aY2 | ||
) |
Set the coordinates of a SIGNDOC_ImageRect object.
[in] | aObj | A pointer to the SIGNDOC_ImageRect 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_ImageRect_uniteWith | ( | struct SIGNDOC_ImageRect * | aObj, |
const struct SIGNDOC_ImageRect * | 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_ImageRect object. |
[in] | aOther | A pointer to the other SIGNDOC_ImageRect object. |
int mX1 |
The first X coordinate.
int mX2 |
The second X coordinate.
int mY1 |
The first Y coordinate.
int mY2 |
The second Y coordinate.