SignDoc SDK (C)  5.0.0
SIGNDOC_ImageRect Class Reference

A rectangle for use with SIGNDOC_Image. More...

#include <SignDocSDK-c.h>

Public Member Functions

struct SIGNDOC_ImageRectSIGNDOC_ImageRect_new (struct SIGNDOC_Exception **aEx)
 SIGNDOC_ImageRect constructor. More...
 
struct SIGNDOC_ImageRectSIGNDOC_ImageRect_newXY (struct SIGNDOC_Exception **aEx, int aX1, int aY1, int aX2, int aY2)
 SIGNDOC_ImageRect constructor. More...
 
struct SIGNDOC_ImageRectSIGNDOC_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...
 

Detailed Description

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.

Member Function Documentation

void SIGNDOC_ImageRect_assign ( struct SIGNDOC_ImageRect aObj,
const struct SIGNDOC_ImageRect aSource 
)

SIGNDOC_ImageRect assignment operator.

Parameters
[in]aObjA pointer to the SIGNDOC_ImageRect object.
[in]aSourceA 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.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_ImageRect object.
Returns
A pointer to the new SIGNDOC_ImageRect object.
void SIGNDOC_ImageRect_delete ( struct SIGNDOC_ImageRect aObj)

SIGNDOC_ImageRect destructor.

Parameters
[in]aObjA pointer to the SIGNDOC_ImageRect object.
int SIGNDOC_ImageRect_getHeight ( const struct SIGNDOC_ImageRect aObj)

Get the height of the rectangle.

Parameters
[in]aObjA pointer to the SIGNDOC_ImageRect object.
Returns
The height of the rectangle.
int SIGNDOC_ImageRect_getWidth ( const struct SIGNDOC_ImageRect aObj)

Get the width of the rectangle.

Parameters
[in]aObjA pointer to the SIGNDOC_ImageRect object.
Returns
The width of the rectangle.
int SIGNDOC_ImageRect_getX1 ( const struct SIGNDOC_ImageRect aObj)

Get the first X coordinate of a SIGNDOC_ImageRect object.

Parameters
[in]aObjA pointer to the SIGNDOC_ImageRect object.
Returns
The first X coordinate.
int SIGNDOC_ImageRect_getX2 ( const struct SIGNDOC_ImageRect aObj)

Get the second X coordinate of a SIGNDOC_ImageRect object.

Parameters
[in]aObjA pointer to the SIGNDOC_ImageRect object.
Returns
The second X coordinate.
int SIGNDOC_ImageRect_getY1 ( const struct SIGNDOC_ImageRect aObj)

Get the first Y coordinate of a SIGNDOC_ImageRect object.

Parameters
[in]aObjA pointer to the SIGNDOC_ImageRect object.
Returns
The first Y coordinate.
int SIGNDOC_ImageRect_getY2 ( const struct SIGNDOC_ImageRect aObj)

Get the second Y coordinate of a SIGNDOC_ImageRect object.

Parameters
[in]aObjA pointer to the SIGNDOC_ImageRect object.
Returns
The second Y coordinate.
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.

Parameters
[in]aObjA pointer to the SIGNDOC_ImageRect object.
[in]aOtherA 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.

Parameters
[in]aObjA pointer to the SIGNDOC_ImageRect object.
Returns
SIGNDOC_TRUE iff the rectangle is empty.
struct SIGNDOC_ImageRect * SIGNDOC_ImageRect_new ( struct SIGNDOC_Exception **  aEx)

SIGNDOC_ImageRect constructor.

All coordinates will be 0.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
Returns
A pointer to the new SIGNDOC_ImageRect object.
struct SIGNDOC_ImageRect * SIGNDOC_ImageRect_newXY ( struct SIGNDOC_Exception **  aEx,
int  aX1,
int  aY1,
int  aX2,
int  aY2 
)

SIGNDOC_ImageRect constructor.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aX1The first X coordinate.
[in]aY1The first Y coordinate.
[in]aX2The second X coordinate.
[in]aY2The second Y coordinate.
Returns
A pointer to the new SIGNDOC_ImageRect object.
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.

Parameters
[in]aObjA 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.

Parameters
[in]aObjA pointer to the SIGNDOC_ImageRect object.
[in]aX1The first X coordinate.
[in]aY1The first Y coordinate.
[in]aX2The second X coordinate.
[in]aY2The 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.

Parameters
[in]aObjA pointer to the SIGNDOC_ImageRect object.
[in]aOtherA pointer to the other SIGNDOC_ImageRect object.

Member Data Documentation

int mX1

The first X coordinate.

int mX2

The second X coordinate.

int mY1

The first Y coordinate.

int mY2

The second Y coordinate.


The documentation for this class was generated from the following file: