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

继承自 SystemIDisposable .

Public 成员函数

 RectI ()
 构造一个未初始化的矩形。
 
 RectI (int left1, int top1, int right1, int bottom1)
 用左上角和右下角构造矩形。 更多...
 
bool Contains (RectI other_rect)
 检查当前矩形是否完全包含其他提供的矩形。 即检查其他矩形是否完全在当前矩形内部。 更多...
 
bool Contains (int x, int y)
 检查当前矩形是否包含提供的点。 即检查提供的点是否在当前矩形内部。 更多...
 
int Height ()
 获取矩形的高度。 更多...
 
void Intersect (RectI src)
 与矩形求交集。 更多...
 
void Intersect (int left1, int top1, int right1, int bottom1)
 与矩形求交集。 更多...
 
bool IsEmpty ()
 验证矩形是否为空。 更多...
 
void Normalize ()
 规范化矩形。确保left <= right,top <= bottom。 更多...
 
void Offset (int dx, int dy)
 通过x和y方向的增量值移动坐标。 更多...
 
void Union (RectI other_rect)
 与矩形求并集。 更多...
 
bool Valid ()
 检查当前矩形是否有效。 更多...
 
int Width ()
 获取矩形的宽度。 更多...
 

属性

int bottom [get, set]
 下边界
 
int left [get, set]
 左边界
 
int right [get, set]
 右边界
 
int top [get, set]
 上边界
 

详细描述

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

构造及析构函数说明

◆ RectI()

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

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

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

成员函数说明

◆ Contains() [1/2]

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

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

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

◆ Contains() [2/2]

bool foxit.common.fxcrt.RectI.Contains ( int  x,
int  y 
)
inline

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

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

◆ Height()

int foxit.common.fxcrt.RectI.Height ( )
inline

获取矩形的高度。

返回
矩形的高度。

◆ Intersect() [1/2]

void foxit.common.fxcrt.RectI.Intersect ( RectI  src)
inline

与矩形求交集。

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

◆ Intersect() [2/2]

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

与矩形求交集。

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

◆ IsEmpty()

bool foxit.common.fxcrt.RectI.IsEmpty ( )
inline

验证矩形是否为空。

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

◆ Normalize()

void foxit.common.fxcrt.RectI.Normalize ( )
inline

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

返回
无。

◆ Offset()

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

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

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

◆ Union()

void foxit.common.fxcrt.RectI.Union ( RectI  other_rect)
inline

与矩形求并集。

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

◆ Valid()

bool foxit.common.fxcrt.RectI.Valid ( )
inline

检查当前矩形是否有效。

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

◆ Width()

int foxit.common.fxcrt.RectI.Width ( )
inline

获取矩形的宽度。

返回
矩形的宽度。