com.foxit.sdk.common.fxcrt.RectI Class Reference

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...
 
boolean 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...
 
boolean 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 getBottom ()
 Get the bottom. More...
 
int getLeft ()
 Get the left. More...
 
int getRight ()
 Get the right. More...
 
int getTop ()
 Get the top. 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...
 
boolean 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 setBottom (int value)
 Set the bottom. More...
 
void setLeft (int value)
 Set the left. More...
 
void setRight (int value)
 Set the right. More...
 
void setTop (int value)
 Set the top. More...
 
void union (RectI other_rect)
 Union with a rect.
More...
 
int width ()
 Get the width of the rect.
More...
 

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

◆ RectI()

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

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

Parameters
left1The left.
top1The top.
right1The right.
bottom1The bottom.

Member Function Documentation

◆ contains() [1/2]

boolean com.foxit.sdk.common.fxcrt.RectI.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.

Parameters
other_rectThe other provided rect.
Returns
TRUE means current rect fully contains the other rectangle, while FALSE means not.

◆ contains() [2/2]

boolean com.foxit.sdk.common.fxcrt.RectI.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.

Parameters
xThe x coordinate of the provided point.
yThe y coordinate of the provided point.
Returns
TRUE means current rect contains the provided point, while FALSE means not.

◆ getBottom()

com.foxit.sdk.common.fxcrt.RectI.getBottom ( )

Get the bottom.

Returns
The bottom.

◆ getLeft()

com.foxit.sdk.common.fxcrt.RectI.getLeft ( )

Get the left.

Returns
The left.

◆ getRight()

com.foxit.sdk.common.fxcrt.RectI.getRight ( )

Get the right.

Returns
The right.

◆ getTop()

com.foxit.sdk.common.fxcrt.RectI.getTop ( )

Get the top.

Returns
The top.

◆ height()

int com.foxit.sdk.common.fxcrt.RectI.height ( )

Get the height of the rect.

Returns
The height of the rect.

◆ intersect() [1/2]

void com.foxit.sdk.common.fxcrt.RectI.intersect ( RectI  src)

Intersect with a rect.

Parameters
srcThe rect to intersect with.
Returns
None.

◆ intersect() [2/2]

void com.foxit.sdk.common.fxcrt.RectI.intersect ( int  left1,
int  top1,
int  right1,
int  bottom1 
)

Intersect with a rect.

Parameters
left1The left of the rect to intersect with.
top1The top of the rect to intersect with.
right1The right of the rect to intersect with.
bottom1The bottom of the rect to intersect with.
Returns
None.

◆ isEmpty()

boolean com.foxit.sdk.common.fxcrt.RectI.isEmpty ( )

Verify whether the rect is empty.

Returns
TRUE means current rect is empty, while FALSE means not.

◆ normalize()

void com.foxit.sdk.common.fxcrt.RectI.normalize ( )

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

Returns
None.

◆ offset()

void com.foxit.sdk.common.fxcrt.RectI.offset ( int  dx,
int  dy 
)

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

Parameters
dxThe delta value of x-direction.
dyThe delta value of y-direction.
Returns
None.

◆ setBottom()

com.foxit.sdk.common.fxcrt.RectI.setBottom ( int  value)

Set the bottom.

Parameters
[in]bottomThe bottom.
Returns
None.

◆ setLeft()

com.foxit.sdk.common.fxcrt.RectI.setLeft ( int  value)

Set the left.

Parameters
[in]leftThe left.
Returns
None.

◆ setRight()

com.foxit.sdk.common.fxcrt.RectI.setRight ( int  value)

Set the right.

Parameters
[in]rightThe right.
Returns
None.

◆ setTop()

com.foxit.sdk.common.fxcrt.RectI.setTop ( int  value)

Set the top.

Parameters
[in]topThe top.
Returns
None.

◆ union()

void com.foxit.sdk.common.fxcrt.RectI.union ( RectI  other_rect)

Union with a rect.

Parameters
other_rectThe rect to union with.
Returns
None.

◆ width()

int com.foxit.sdk.common.fxcrt.RectI.width ( )

Get the width of the rect.

Returns
The width of the rect.

Foxit Software Corporation Logo
@2018 Foxit Software Incorporated. All rights reserved.