Foxit PDF SDK
com.foxit.sdk.common.fxcrt.RectI类 参考

Public 成员函数

 RectI ()
 构造一个未初始化的矩形。

 
 RectI (int left1, int top1, int right1, int bottom1)
 用左上角和右下角构造矩形。
更多...
 
boolean contains (int x, int y)
 检查当前矩形是否包含提供的点。 即检查提供的点是否在当前矩形内部。
更多...
 
boolean contains (RectI other_rect)
 检查当前矩形是否完全包含其他提供的矩形。 即检查其他矩形是否完全在当前矩形内部。
更多...
 
int getBottom ()
 Get 下边界
更多...
 
int getLeft ()
 Get 左边界
更多...
 
int getRight ()
 Get 右边界
更多...
 
int getTop ()
 Get 上边界
更多...
 
int height ()
 获取矩形的高度。
更多...
 
void intersect (int left1, int top1, int right1, int bottom1)
 与矩形求交集。
更多...
 
void intersect (RectI src)
 与矩形求交集。
更多...
 
boolean isEmpty ()
 验证矩形是否为空。
更多...
 
void normalize ()
 规范化矩形。确保left <= right,top <= bottom。
更多...
 
void offset (int dx, int dy)
 通过x和y方向的增量值移动坐标。
更多...
 
void setBottom (int value)
 Set 下边界
更多...
 
void setLeft (int value)
 Set 左边界
更多...
 
void setRight (int value)
 Set 右边界
更多...
 
void setTop (int value)
 Set 上边界
更多...
 
void union (RectI other_rect)
 与矩形求并集。
更多...
 
boolean valid ()
 检查当前矩形是否有效。
更多...
 
int width ()
 获取矩形的宽度。
更多...
 

详细描述

表示Windows坐标系整数矩形的结构。 定义为等效于Windows RECT结构,具有一些便利的函数成员。 此结构使用Windows空间,其中Y轴从上到下运行。

构造及析构函数说明

◆ RectI()

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

用左上角和右下角构造矩形。

参数
[in]left1左边界。
[in]top1上边界。
[in]right1右边界。
[in]bottom1下边界。

成员函数说明

◆ contains() [1/2]

boolean com.foxit.sdk.common.fxcrt.RectI.contains ( int  x,
int  y 
)

检查当前矩形是否包含提供的点。 即检查提供的点是否在当前矩形内部。

参数
[in]x提供的点的x坐标。
[in]y提供的点的y坐标。
返回
true表示当前矩形包含提供的点,false表示不包含。

◆ contains() [2/2]

boolean com.foxit.sdk.common.fxcrt.RectI.contains ( RectI  other_rect)

检查当前矩形是否完全包含其他提供的矩形。 即检查其他矩形是否完全在当前矩形内部。

参数
[in]other_rect其他提供的矩形。
返回
true表示当前矩形完全包含其他矩形,false表示不包含。

◆ getBottom()

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

Get 下边界

返回
下边界

◆ getLeft()

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

Get 左边界

返回
左边界

◆ getRight()

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

Get 右边界

返回
右边界

◆ getTop()

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

Get 上边界

返回
上边界

◆ height()

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

获取矩形的高度。

返回
矩形的高度。

◆ intersect() [1/2]

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

与矩形求交集。

参数
[in]left1要求交集的矩形的左边界。
[in]top1要求交集的矩形的上边界。
[in]right1要求交集的矩形的右边界。
[in]bottom1要求交集的矩形的下边界。
返回
无。

◆ intersect() [2/2]

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

与矩形求交集。

参数
[in]src要求交集的矩形。
返回
无。

◆ isEmpty()

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

验证矩形是否为空。

返回
true表示当前矩形为空,false表示不为空。

◆ normalize()

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

规范化矩形。确保left <= right,top <= bottom。

返回
无。

◆ offset()

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

通过x和y方向的增量值移动坐标。

参数
[in]dxx方向的增量值。
[in]dyy方向的增量值。
返回
无。

◆ setBottom()

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

Set 下边界

参数
[in]value下边界
返回
None.

◆ setLeft()

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

Set 左边界

参数
[in]value左边界
返回
None.

◆ setRight()

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

Set 右边界

参数
[in]value右边界
返回
None.

◆ setTop()

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

Set 上边界

参数
[in]value上边界
返回
None.

◆ union()

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

与矩形求并集。

参数
[in]other_rect要求并集的矩形。
返回
无。

◆ valid()

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

检查当前矩形是否有效。

返回
true表示有效,false表示无效。

◆ width()

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

获取矩形的宽度。

返回
矩形的宽度。