SignDoc SDK (C++)  5.0.0
SignDocImageRect Class Reference

A rectangle for use with SignDocImage. More...

#include <SignDocSDK-cpp.h>

Inheritance diagram for SignDocImageRect:
SignDocWeightedFrame

Public Member Functions

 SignDocImageRect ()
 Constructor. More...
 
 SignDocImageRect (int aX1, int aY1, int aX2, int aY2)
 Constructor. More...
 
 SignDocImageRect (const SignDocImageRect &aSource)
 Copy constructor. More...
 
void set (int aX1, int aY1, int aX2, int aY2)
 Set the coordinates of the rectangle. More...
 
 ~SignDocImageRect ()
 Destructor. More...
 
int getWidth () const
 Get the width of the rectangle. More...
 
int getHeight () const
 Get the height of the rectangle. More...
 
void normalize ()
 Normalize the rectangle. More...
 
bool isEmpty () const
 Check if the rectangle is empty. More...
 
void intersectWith (const SignDocImageRect &aOther)
 Intersect this rectangle with another one. More...
 
void uniteWith (const SignDocImageRect &aOther)
 Unite this rectangle with another one. More...
 
int getX1 () const
 Get the first X coordinate. More...
 
int getY1 () const
 Get the first Y coordinate. More...
 
int getX2 () const
 Get the second X coordinate. More...
 
int getY2 () const
 Get the second Y coordinate. More...
 

Data Fields

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 SignDocImage.

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.

Constructor & Destructor Documentation

SignDocImageRect ( )
inline

Constructor.

All coordinates will be 0.

SignDocImageRect ( int  aX1,
int  aY1,
int  aX2,
int  aY2 
)
inline

Constructor.

Parameters
[in]aX1The first X coordinate.
[in]aY1The first Y coordinate.
[in]aX2The second X coordinate.
[in]aY2The second Y coordinate.
SignDocImageRect ( const SignDocImageRect aSource)
inline

Copy constructor.

Parameters
[in]aSourceThe object to be copied.
~SignDocImageRect ( )
inline

Destructor.

Member Function Documentation

int getHeight ( ) const
inline

Get the height of the rectangle.

Returns
The height of the rectangle.
int getWidth ( ) const
inline

Get the width of the rectangle.

Returns
The width of the rectangle.
int getX1 ( ) const
inline

Get the first X coordinate.

int getX2 ( ) const
inline

Get the second X coordinate.

int getY1 ( ) const
inline

Get the first Y coordinate.

int getY2 ( ) const
inline

Get the second Y coordinate.

void intersectWith ( const SignDocImageRect 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]aOtherThe other rectangle.
See also
isEmpty(), uniteWith()
bool isEmpty ( ) const
inline

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.
void normalize ( )
inline

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).

void set ( int  aX1,
int  aY1,
int  aX2,
int  aY2 
)
inline

Set the coordinates of the rectangle.

Parameters
[in]aX1The first X coordinate.
[in]aY1The first Y coordinate.
[in]aX2The second X coordinate.
[in]aY2The second Y coordinate.
void uniteWith ( const SignDocImageRect 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]aOtherThe other rectangle.
See also
intersectWith(), isEmpty()

Field 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: