Foxit PDF SDK
FSRectI Class Reference

Inherits NSObject.

Instance Methods

(BOOL) - contains:
 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) - containsPoint: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...
 
(id) - init
 Construct a rect not initialized.

 
(id) - initWithLeft1:top1:right1:bottom1:
 Construct a rect with left-top and right bottom corners.
More...
 
(void) - intersect:
 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:dy:
 Shift the coordinates by delta value of x and y directions.
More...
 
(void) - union:
 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
 The bottom.

 
int left
 The left.

 
int right
 The right.

 
int top
 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.

Method Documentation

◆ contains:()

- (BOOL) contains: (FSRectI*)  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
[in]other_rectThe other provided rect.
Returns
YES means current rect fully contains the other rectangle, while NO means not.

◆ containsPoint:y:()

- (int) containsPoint: (int)  x
y: (int)  y 

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
YES means current rect contains the provided point, while NO means not.

◆ height()

- (int) height

Get the height of the rect.

Returns
The height of the rect.

◆ initWithLeft1:top1:right1:bottom1:()

- (id) initWithLeft1: (int)  left1
top1: (int)  top1
right1: (int)  right1
bottom1: (int)  bottom1 

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

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

◆ intersect:()

- (void) intersect: (FSRectI*)  src

Intersect with a rect.

Parameters
[in]srcThe rect to intersect with.
Returns
None.

◆ isEmpty()

- (BOOL) isEmpty

Verify whether the rect is empty.

Returns
YES means current rect is empty, while NO means not.

◆ normalize()

- (void) normalize

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

Returns
None.

◆ offset:dy:()

- (void) offset: (int)  dx
dy: (int)  dy 

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.

◆ union:()

- (void) union: (FSRectI*)  other_rect

Union with a rect.

Parameters
[in]other_rectThe rect to union with.
Returns
None.

◆ valid()

- (BOOL) valid

Check if current rectangle is valid.

Returns
YES means valid, while NO means invalid.

◆ width()

- (int) width

Get the width of the rect.

Returns
The width of the rect.