Foxit PDF SDK
 All Classes Namespaces Functions Enumerations Enumerator Properties Pages
foxit.common.fxcrt.RectI Class Reference

Inherits SystemIDisposable.

Public Member Functions

 RectI ()
 Construct a rect not initialized.
 
 RectI (int left1, int top1, int right1, int bottom1)
 Construct a rect with left-top and right bottom corners. More...
 
bool Contains (RectI other_rect)
 Check if current rectangle fully contains the other provided rectangle. That means to check if the other rectangle is fully inside current one. More...
 
bool Contains (int x, int y)
 Check if current rectangle contains the provided point. That means to check if the provided point is inside current one. More...
 
int Height ()
 Get the height of the rect. More...
 
void Intersect (RectI src)
 Intersect with a rect. More...
 
void Intersect (int left1, int top1, int right1, int bottom1)
 Intersect with a rect. More...
 
bool IsEmpty ()
 Verify whether the rect is empty. More...
 
void Normalize ()
 Normalize the rect. Make sure left <= right, top <= bottom. More...
 
void Offset (int dx, int dy)
 Shift the coordinates by delta value of x and y directions. More...
 
void Union (RectI other_rect)
 Union with a rect. More...
 
bool Valid ()
 Check if current rectangle is valid. More...
 
int Width ()
 Get the width of the rect. More...
 

Properties

int bottom [get, set]
 The bottom.
 
int left [get, set]
 The left.
 
int right [get, set]
 The right.
 
int top [get, set]
 The top.
 

Detailed Description

The struct represents integer rectangle for Windows coordinates. Defined as equivalent of Windows RECT structure, with some convenient function members. This structure use Windows space where Y axis runs from top to bottom.

Constructor & Destructor Documentation

foxit.common.fxcrt.RectI.RectI ( int  left1,
int  top1,
int  right1,
int  bottom1 
)
inline

Construct a rect with left-top and right bottom corners.

Parameters
[in]left1The left.
[in]top1The top.
[in]right1The right.
[in]bottom1The bottom.

Member Function Documentation

bool foxit.common.fxcrt.RectI.Contains ( RectI  other_rect)
inline

Check if current rectangle fully contains the other provided rectangle. That means to check if the other rectangle is fully inside current one.

Parameters
[in]other_rectThe other provided rect.
Returns
true means current rect fully contains the other rectangle, while false means not.
bool foxit.common.fxcrt.RectI.Contains ( int  x,
int  y 
)
inline

Check if current rectangle contains the provided point. That means to check if the provided point is inside current one.

Parameters
[in]xThe x coordinate of the provided point.
[in]yThe y coordinate of the provided point.
Returns
true means current rect contains the provided point, while false means not.
int foxit.common.fxcrt.RectI.Height ( )
inline

Get the height of the rect.

Returns
The height of the rect.
void foxit.common.fxcrt.RectI.Intersect ( RectI  src)
inline

Intersect with a rect.

Parameters
[in]srcThe rect to intersect with.
Returns
None.
void foxit.common.fxcrt.RectI.Intersect ( int  left1,
int  top1,
int  right1,
int  bottom1 
)
inline

Intersect with a rect.

Parameters
[in]left1The left of the rect to intersect with.
[in]top1The top of the rect to intersect with.
[in]right1The right of the rect to intersect with.
[in]bottom1The bottom of the rect to intersect with.
Returns
None.
bool foxit.common.fxcrt.RectI.IsEmpty ( )
inline

Verify whether the rect is empty.

Returns
true means current rect is empty, while false means not.
void foxit.common.fxcrt.RectI.Normalize ( )
inline

Normalize the rect. Make sure left <= right, top <= bottom.

Returns
None.
void foxit.common.fxcrt.RectI.Offset ( int  dx,
int  dy 
)
inline

Shift the coordinates by delta value of x and y directions.

Parameters
[in]dxThe delta value of x-direction.
[in]dyThe delta value of y-direction.
Returns
None.
void foxit.common.fxcrt.RectI.Union ( RectI  other_rect)
inline

Union with a rect.

Parameters
[in]other_rectThe rect to union with.
Returns
None.
bool foxit.common.fxcrt.RectI.Valid ( )
inline

Check if current rectangle is valid.

Returns
true means valid, while false means invalid.
int foxit.common.fxcrt.RectI.Width ( )
inline

Get the width of the rect.

Returns
The width of the rect.