Foxit PDF SDK
FX_RECT结构体 参考

Public 成员函数

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

Public 属性

int bottom
 下边界
 
int left
 左边界
 
int right
 右边界
 
int top
 上边界
 

详细描述

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

构造及析构函数说明

◆ FX_RECT()

FX_RECT::FX_RECT ( int  left1,
int  top1,
int  right1,
int  bottom1 
)
inline

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

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

成员函数说明

◆ Contains() [1/2]

FX_BOOL FX_RECT::Contains ( const FX_RECT other_rect) const
inline

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

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

◆ Contains() [2/2]

FX_BOOL FX_RECT::Contains ( int  x,
int  y 
) const
inline

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

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

◆ Height()

int FX_RECT::Height ( ) const
inline

获取矩形的高度。

返回
矩形的高度。

◆ Intersect() [1/2]

void FX_RECT::Intersect ( const FX_RECT src)

与矩形求交集。

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

◆ Intersect() [2/2]

void FX_RECT::Intersect ( int  left1,
int  top1,
int  right1,
int  bottom1 
)
inline

与矩形求交集。

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

◆ IsEmpty()

FX_BOOL FX_RECT::IsEmpty ( ) const
inline

验证矩形是否为空。

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

◆ Normalize()

void FX_RECT::Normalize ( )

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

返回
无。

◆ Offset()

void FX_RECT::Offset ( int  dx,
int  dy 
)
inline

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

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

◆ operator !=()

FX_BOOL FX_RECT::operator != ( const FX_RECT src) const
inline

比较(!=)运算符重载。比较两个矩形。请确保它们首先被规范化。

参数
[in]src要比较的矩形。
返回
true表示不相等,false表示相等。

◆ operator==()

FX_BOOL FX_RECT::operator== ( const FX_RECT src) const
inline

比较(==)运算符重载。比较两个矩形。请确保它们首先被规范化。

参数
[in]src要比较的矩形。
返回
true表示相等,false表示不相等。

◆ Union()

void FX_RECT::Union ( const FX_RECT other_rect)

与矩形求并集。

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

◆ Valid()

FX_BOOL FX_RECT::Valid ( ) const

检查当前矩形是否有效。

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

◆ Width()

int FX_RECT::Width ( ) const
inline

获取矩形的宽度。

返回
矩形的宽度。