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

Public 成员函数

 RectF ()
 构造一个空矩形。

 
 RectF (float left1, float bottom1, float right1, float top1)
 用左下角和右上角构造矩形。
更多...
 
 RectF (RectI rect)
 用rectangle对象构造矩形。
更多...
 
boolean contains (float x, float y)
 检查当前矩形是否完全包含提供的点。 即检查提供的点是否在当前矩形内部。
更多...
 
boolean contains (RectF other_rect)
 检查当前矩形是否完全包含其他提供的矩形。 即检查其他矩形是否完全在当前矩形内部。
更多...
 
void deflate (float left, float bottom, float right, float top)
 减少矩形的宽度和高度。
更多...
 
void deflate (float x, float y)
 减少矩形的宽度和高度。
更多...
 
void deflate (RectF rt)
 减少矩形的宽度和高度。
更多...
 
float getBottom ()
 Get 底部边界。
更多...
 
RectI getClosestRect ()
 获取最接近的整数矩形。
更多...
 
RectI getInnerRect ()
 转换为内部整数矩形。
更多...
 
float getLeft ()
 Get 左边界。
更多...
 
RectI getOuterRect ()
 转换为外部整数矩形。
更多...
 
float getRight ()
 Get 右边界。
更多...
 
float getTop ()
 Get 顶部边界。
更多...
 
float height ()
 获取矩形的高度。
更多...
 
void inflate (float left, float bottom, float right, float top)
 增加矩形的宽度和高度。
更多...
 
void inflate (float x, float y)
 增加矩形的宽度和高度。
更多...
 
void inflate (RectF rt)
 增加矩形的宽度和高度。
更多...
 
void initRect (float x, float y)
 将矩形初始化为单个点。
更多...
 
void intersect (RectF other_rect)
 与矩形求交集。
更多...
 
boolean isEmpty ()
 验证矩形是否为空。
更多...
 
void normalize ()
 规范化矩形。确保left <= right,以及bottom <= top。
更多...
 
void reset ()
 重置矩形,将坐标设置为0。
更多...
 
void setBottom (float value)
 Set 底部边界。
更多...
 
void setLeft (float value)
 Set 左边界。
更多...
 
void setRight (float value)
 Set 右边界。
更多...
 
void setTop (float value)
 Set 顶部边界。
更多...
 
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 boolean isRectAdjacent (RectF rect1, RectF rect2, float alignmentTolerance, float distanceTolerance, int direction)
 检查一个矩形是否在水平或垂直方向上与另一个矩形相邻。
更多...
 

详细描述

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

构造及析构函数说明

◆ RectF() [1/2]

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

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

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

◆ RectF() [2/2]

com.foxit.sdk.common.fxcrt.RectF.RectF ( RectI  rect)

用rectangle对象构造矩形。

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

成员函数说明

◆ contains() [1/2]

boolean com.foxit.sdk.common.fxcrt.RectF.contains ( float  x,
float  y 
)

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

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

◆ contains() [2/2]

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

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

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

◆ deflate() [1/3]

void com.foxit.sdk.common.fxcrt.RectF.deflate ( float  left,
float  bottom,
float  right,
float  top 
)

减少矩形的宽度和高度。

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

◆ deflate() [2/3]

void com.foxit.sdk.common.fxcrt.RectF.deflate ( float  x,
float  y 
)

减少矩形的宽度和高度。

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

◆ deflate() [3/3]

void com.foxit.sdk.common.fxcrt.RectF.deflate ( RectF  rt)

减少矩形的宽度和高度。

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

◆ getBBox()

static RectF com.foxit.sdk.common.fxcrt.RectF.getBBox ( PointF  pPoints,
int  nPoints 
)
static

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

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

◆ getBottom()

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

Get 底部边界。

返回
底部边界。

◆ getClosestRect()

RectI com.foxit.sdk.common.fxcrt.RectF.getClosestRect ( )

获取最接近的整数矩形。

返回
最接近的整数矩形。

◆ getInnerRect()

RectI com.foxit.sdk.common.fxcrt.RectF.getInnerRect ( )

转换为内部整数矩形。

返回
内部整数矩形。

◆ getLeft()

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

Get 左边界。

返回
左边界。

◆ getOuterRect()

RectI com.foxit.sdk.common.fxcrt.RectF.getOuterRect ( )

转换为外部整数矩形。

返回
外部整数矩形。

◆ getRight()

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

Get 右边界。

返回
右边界。

◆ getTop()

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

Get 顶部边界。

返回
顶部边界。

◆ height()

float com.foxit.sdk.common.fxcrt.RectF.height ( )

获取矩形的高度。

返回
矩形的高度。

◆ inflate() [1/3]

void com.foxit.sdk.common.fxcrt.RectF.inflate ( float  left,
float  bottom,
float  right,
float  top 
)

增加矩形的宽度和高度。

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

◆ inflate() [2/3]

void com.foxit.sdk.common.fxcrt.RectF.inflate ( float  x,
float  y 
)

增加矩形的宽度和高度。

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

◆ inflate() [3/3]

void com.foxit.sdk.common.fxcrt.RectF.inflate ( RectF  rt)

增加矩形的宽度和高度。

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

◆ initRect()

void com.foxit.sdk.common.fxcrt.RectF.initRect ( float  x,
float  y 
)

将矩形初始化为单个点。

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

◆ intersect()

void com.foxit.sdk.common.fxcrt.RectF.intersect ( RectF  other_rect)

与矩形求交集。

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

◆ isEmpty()

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

验证矩形是否为空。

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

◆ isRectAdjacent()

static boolean com.foxit.sdk.common.fxcrt.RectF.isRectAdjacent ( RectF  rect1,
RectF  rect2,
float  alignmentTolerance,
float  distanceTolerance,
int  direction 
)
static

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

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

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

◆ normalize()

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

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

返回
无。

◆ reset()

void com.foxit.sdk.common.fxcrt.RectF.reset ( )

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

返回
无。

◆ setBottom()

com.foxit.sdk.common.fxcrt.RectF.setBottom ( float  value)

Set 底部边界。

参数
[in]value底部边界。
返回
None.

◆ setLeft()

com.foxit.sdk.common.fxcrt.RectF.setLeft ( float  value)

Set 左边界。

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

◆ setRight()

com.foxit.sdk.common.fxcrt.RectF.setRight ( float  value)

Set 右边界。

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

◆ setTop()

com.foxit.sdk.common.fxcrt.RectF.setTop ( float  value)

Set 顶部边界。

参数
[in]value顶部边界。
返回
None.

◆ transform()

void com.foxit.sdk.common.fxcrt.RectF.transform ( Matrix2D  pMatrix)

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

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

◆ translate()

void com.foxit.sdk.common.fxcrt.RectF.translate ( float  e,
float  f 
)

平移矩形。

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

◆ union()

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

与矩形求并集。

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

◆ updateRect()

void com.foxit.sdk.common.fxcrt.RectF.updateRect ( float  x,
float  y 
)

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

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

◆ width()

float com.foxit.sdk.common.fxcrt.RectF.width ( )

获取矩形的宽度。

返回
矩形的宽度。