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

继承自 SystemIDisposable .

Public 成员函数

 RectF ()
 构造一个空矩形。
 
 RectF (float left1, float bottom1, float right1, float top1)
 用左下角和右上角构造矩形。 更多...
 
 RectF (RectI rect)
 用rectangle对象构造矩形。 更多...
 
bool Contains (RectF other_rect)
 检查当前矩形是否完全包含其他提供的矩形。 即检查其他矩形是否完全在当前矩形内部。 更多...
 
bool Contains (float x, float y)
 检查当前矩形是否完全包含提供的点。 即检查提供的点是否在当前矩形内部。 更多...
 
void Deflate (float x, float y)
 减少矩形的宽度和高度。 更多...
 
void Deflate (float left, float bottom, float right, float top)
 减少矩形的宽度和高度。 更多...
 
void Deflate (RectF rt)
 减少矩形的宽度和高度。 更多...
 
RectI GetClosestRect ()
 获取最接近的整数矩形。 更多...
 
RectI GetInnerRect ()
 转换为内部整数矩形。 更多...
 
RectI GetOutterRect ()
 转换为外部整数矩形。 更多...
 
float Height ()
 获取矩形的高度。 更多...
 
void Inflate (float x, float y)
 增加矩形的宽度和高度。 更多...
 
void Inflate (float left, float bottom, float right, float top)
 增加矩形的宽度和高度。 更多...
 
void Inflate (RectF rt)
 增加矩形的宽度和高度。 更多...
 
void InitRect (float x, float y)
 将矩形初始化为单个点。 更多...
 
void Intersect (RectF other_rect)
 与矩形求交集。 更多...
 
bool IsEmpty ()
 验证矩形是否为空。 更多...
 
void Normalize ()
 规范化矩形。确保left <= right,以及bottom <= top。 更多...
 
void Reset ()
 重置矩形,将坐标设置为0。 更多...
 
void Transform (Matrix2D pMatrix)
 变换矩形。结果矩形总是规范化的。 更多...
 
void Translate (float e, float f)
 平移矩形。 更多...
 
void Union (RectF other_rect)
 与矩形求并集。 更多...
 
void UpdateRect (float x, float y)
 更新矩形以包含指定的点。 更多...
 
float Width ()
 获取矩形的宽度。 更多...
 

静态 Public 成员函数

static RectF GetBBox (PointF pPoints, int nPoints)
 获取输入点数组的边界框。 更多...
 
static bool IsRectAdjacent (RectF rect1, RectF rect2, float alignmentTolerance, float distanceTolerance, int direction)
 检查一个矩形是否在水平或垂直方向上与另一个矩形相邻。 更多...
 

属性

float bottom [get, set]
 底部边界。
 
float left [get, set]
 左边界。
 
float right [get, set]
 右边界。
 
float top [get, set]
 顶部边界。
 

详细描述

浮点坐标矩形。 规范化的浮点矩形始终具有大于bottom的top,这与Windows矩形相反。

构造及析构函数说明

◆ RectF() [1/2]

foxit.common.fxcrt.RectF.RectF ( float  left1,
float  bottom1,
float  right1,
float  top1 
)
inline

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

参数
[in]left1输入左下角的x坐标。
[in]bottom1输入左下角的y坐标。
[in]right1输入右上角的x坐标。
[in]top1输入右上角的y坐标。

◆ RectF() [2/2]

foxit.common.fxcrt.RectF.RectF ( RectI  rect)
inline

用rectangle对象构造矩形。

参数
[in]rect输入的rectangle对象。

成员函数说明

◆ Contains() [1/2]

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

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

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

◆ Contains() [2/2]

bool foxit.common.fxcrt.RectF.Contains ( float  x,
float  y 
)
inline

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

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

◆ Deflate() [1/3]

void foxit.common.fxcrt.RectF.Deflate ( float  x,
float  y 
)
inline

减少矩形的宽度和高度。

参数
[in]x用于减少矩形左边和右边的数值。
[in]y用于减少矩形顶部和底部的数值。
返回
无。

◆ Deflate() [2/3]

void foxit.common.fxcrt.RectF.Deflate ( float  left,
float  bottom,
float  right,
float  top 
)
inline

减少矩形的宽度和高度。

参数
[in]left用于减少矩形左边的数值。
[in]bottom用于减少矩形底部的数值。
[in]right用于减少矩形右边的数值。
[in]top用于减少矩形顶部的数值。
返回
无。

◆ Deflate() [3/3]

void foxit.common.fxcrt.RectF.Deflate ( RectF  rt)
inline

减少矩形的宽度和高度。

参数
[in]rt用于减少各边的矩形。
返回
无。

◆ GetBBox()

static RectF foxit.common.fxcrt.RectF.GetBBox ( PointF  pPoints,
int  nPoints 
)
inlinestatic

获取输入点数组的边界框。

参数
[in]pPoints输入的点数组。
[in]nPoints数组中点的数量。
返回
浮点坐标矩形。

◆ GetClosestRect()

RectI foxit.common.fxcrt.RectF.GetClosestRect ( )
inline

获取最接近的整数矩形。

返回
最接近的整数矩形。

◆ GetInnerRect()

RectI foxit.common.fxcrt.RectF.GetInnerRect ( )
inline

转换为内部整数矩形。

返回
内部整数矩形。

◆ GetOutterRect()

RectI foxit.common.fxcrt.RectF.GetOutterRect ( )
inline

转换为外部整数矩形。

返回
外部整数矩形。

◆ Height()

float foxit.common.fxcrt.RectF.Height ( )
inline

获取矩形的高度。

返回
矩形的高度。

◆ Inflate() [1/3]

void foxit.common.fxcrt.RectF.Inflate ( float  x,
float  y 
)
inline

增加矩形的宽度和高度。

参数
[in]x用于扩展矩形左边和右边的数值。
[in]y用于扩展矩形顶部和底部的数值。
返回
无。

◆ Inflate() [2/3]

void foxit.common.fxcrt.RectF.Inflate ( float  left,
float  bottom,
float  right,
float  top 
)
inline

增加矩形的宽度和高度。

参数
[in]left用于扩展矩形左边的数值。
[in]bottom用于扩展矩形底部的数值。
[in]right用于扩展矩形右边的数值。
[in]top用于扩展矩形顶部的数值。
返回
无。

◆ Inflate() [3/3]

void foxit.common.fxcrt.RectF.Inflate ( RectF  rt)
inline

增加矩形的宽度和高度。

参数
[in]rt用于扩展各边的矩形。
返回
无。

◆ InitRect()

void foxit.common.fxcrt.RectF.InitRect ( float  x,
float  y 
)
inline

将矩形初始化为单个点。

参数
[in]x输入点的x坐标。
[in]y输入点的y坐标。
返回
无。

◆ Intersect()

void foxit.common.fxcrt.RectF.Intersect ( RectF  other_rect)
inline

与矩形求交集。

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

◆ IsEmpty()

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

验证矩形是否为空。

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

◆ IsRectAdjacent()

static bool foxit.common.fxcrt.RectF.IsRectAdjacent ( RectF  rect1,
RectF  rect2,
float  alignmentTolerance,
float  distanceTolerance,
int  direction 
)
inlinestatic

检查一个矩形是否在水平或垂直方向上与另一个矩形相邻。

参数
[in]rect1要检查是否与参数 rect2 相邻的矩形。
[in]rect2另一个矩形。
[in]alignmentTolerance两个矩形之间允许的对齐容差。以坐标单位测量,应为非负值。
[in]distanceTolerance两个矩形之间允许的距离容差。以坐标单位测量,应为非负值。
[in]direction指定判断两个矩形之间相邻状态的方向:
  • 0 表示水平方向。

  • 1 表示垂直方向。

返回
true 表示指定的矩形在指定方向上与另一个指定的矩形相邻, 而 false 表示指定的矩形在指定方向上与另一个指定的矩形不相邻。

◆ Normalize()

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

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

返回
无。

◆ Reset()

void foxit.common.fxcrt.RectF.Reset ( )
inline

重置矩形,将坐标设置为0。

返回
无。

◆ Transform()

void foxit.common.fxcrt.RectF.Transform ( Matrix2D  pMatrix)
inline

变换矩形。结果矩形总是规范化的。

参数
[in]pMatrix变换矩阵。
返回
无。

◆ Translate()

void foxit.common.fxcrt.RectF.Translate ( float  e,
float  f 
)
inline

平移矩形。

参数
[in]eX轴上的偏移量。
[in]fY轴上的偏移量。
返回
无。

◆ Union()

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

与矩形求并集。

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

◆ UpdateRect()

void foxit.common.fxcrt.RectF.UpdateRect ( float  x,
float  y 
)
inline

更新矩形以包含指定的点。

参数
[in]x输入点的x坐标。
[in]y输入点的y坐标。
返回
无。

◆ Width()

float foxit.common.fxcrt.RectF.Width ( )
inline

获取矩形的宽度。

返回
矩形的宽度。