|
Foxit PDF SDK
|
Public 成员函数 | |
| Path () | |
| 构造函数。 | |
| Path (Path other) | |
| 使用另一个路径对象的构造函数。 更多... | |
| boolean | appendEllipse (RectF rect) throws com.foxit.sdk.PDFException |
| 向当前路径的末尾添加椭圆图形。 更多... | |
| boolean | appendRect (RectF rect) throws com.foxit.sdk.PDFException |
| 向当前路径的末尾添加矩形图形。 更多... | |
| void | clear () throws com.foxit.sdk.PDFException |
| 清除所有点。 更多... | |
| boolean | closeFigure () throws com.foxit.sdk.PDFException |
| 关闭当前图形(也是当前路径中的最后一个图形)。 更多... | |
| boolean | cubicBezierTo (PointF point1, PointF point2, PointF point3) throws com.foxit.sdk.PDFException |
| 通过三个点向当前图形的末尾添加三次贝塞尔样条: 两个控制点和一个目标点。 更多... | |
| synchronized void | delete () |
| 直接清除C++相关资源。 更多... | |
| PointF | getPoint (int index) throws com.foxit.sdk.PDFException |
| 获取由索引指定的点。 更多... | |
| int | getPointCount () throws com.foxit.sdk.PDFException |
| 获取点的数量。 更多... | |
| int | getPointType (int index) throws com.foxit.sdk.PDFException |
| 获取由索引指定的点的类型。 更多... | |
| void | increasePointCount (int count) throws com.foxit.sdk.PDFException |
| 增加点数量并为这些新点准备足够的内存。 更多... | |
| boolean | isEmpty () |
| 检查当前对象是否为空。 更多... | |
| boolean | lineTo (PointF point) throws com.foxit.sdk.PDFException |
| 向当前图形的末尾添加一个点,并从当前点到新点绘制一条线。 更多... | |
| boolean | moveTo (PointF point) throws com.foxit.sdk.PDFException |
| 向当前路径的末尾添加一个点,以开始新的图形。 更多... | |
| boolean | removePoint (int index) throws com.foxit.sdk.PDFException |
| 移除由索引指定的点。 更多... | |
| boolean | setPoint (int index, PointF point, int type) throws com.foxit.sdk.PDFException |
| 更改由索引指定的点的值和类型。 更多... | |
| void | transform (Matrix2D matrix) throws com.foxit.sdk.PDFException |
| 使用给定矩阵变换当前路径中的所有点。 更多... | |
Public 成员函数 继承自 com.foxit.sdk.common.Base | |
| synchronized void | delete () |
| 直接清除C++相关资源。 更多... | |
静态 Public 属性 | |
| static final int | e_TypeBezierTo = 4 |
| 表示该点是贝塞尔样条的控制点或结束点。 | |
| static final int | e_TypeBezierToCloseFigure = 5 |
| 表示该点是贝塞尔样条的结束点, 并且该点还将连接到此点之前最近的 com.foxit.sdk.common.Path.e_TypeMoveTo 点,以便闭合当前图形。 | |
| static final int | e_TypeLineTo = 2 |
| 表示从前一个点到当前点绘制一条直线。 | |
| static final int | e_TypeLineToCloseFigure = 3 |
| 表示从前一个点到当前点绘制一条直线, 并且该点还将连接到此点之前最近的 com.foxit.sdk.common.Path.e_TypeMoveTo 点,以便闭合当前图形。 | |
| static final int | e_TypeMoveTo = 1 |
| 表示该点是图形的第一个点。 | |
此类表示包含一个或多个图形的路径。
| com.foxit.sdk.common.Path.Path | ( | Path | other | ) |
使用另一个路径对象的构造函数。
| [in] | other | 另一个路径对象。 |
| boolean com.foxit.sdk.common.Path.appendEllipse | ( | RectF | rect | ) | throws com.foxit.sdk.PDFException |
向当前路径的末尾添加椭圆图形。
| [in] | rect | 椭圆图形的外接矩形。 |
| boolean com.foxit.sdk.common.Path.appendRect | ( | RectF | rect | ) | throws com.foxit.sdk.PDFException |
向当前路径的末尾添加矩形图形。
| [in] | rect | 指定矩形图形的矩形。 |
| void com.foxit.sdk.common.Path.clear | ( | ) | throws com.foxit.sdk.PDFException |
清除所有点。
| boolean com.foxit.sdk.common.Path.closeFigure | ( | ) | throws com.foxit.sdk.PDFException |
关闭当前图形(也是当前路径中的最后一个图形)。
关闭当前图形时,最后一点的类型可能会改变:
如果最后一点的类型是 com.foxit.sdk.common.Path.e_TypeMoveTo ,意味着最后一个图形只 有一个点且无法关闭,当前函数将返回 false。
如果最后一点的类型是 com.foxit.sdk.common.Path.e_TypeLineTo , 类型将改变为 com.foxit.sdk.common.Path.e_TypeLineToCloseFigure 。
如果最后一点的类型是 com.foxit.sdk.common.Path.e_TypeLineTo ,类型将改变为 com.foxit.sdk.common.Path.e_TypeBezierToCloseFigure 。
如果最后一点的类型已经是 com.foxit.sdk.common.Path.e_TypeLineToCloseFigure 或 com.foxit.sdk.common.Path.e_TypeBezierToCloseFigure ,意味着最后一个图形已经关闭。 类型不会改变,函数仍将返回 true。
| boolean com.foxit.sdk.common.Path.cubicBezierTo | ( | PointF | point1, |
| PointF | point2, | ||
| PointF | point3 | ||
| ) | throws com.foxit.sdk.PDFException |
通过三个点向当前图形的末尾添加三次贝塞尔样条: 两个控制点和一个目标点。
如果此函数成功,参数 point3 将成为新的"当前点"。
| [in] | point1 | 新点作为三次贝塞尔的第一个控制点,在中。 |
| [in] | point2 | 新点作为三次贝塞尔的第二个控制点,在中。 |
| [in] | point3 | 新点作为三次贝塞尔的目标点,在中。 |
| synchronized void com.foxit.sdk.common.Path.delete | ( | ) |
直接清除C++相关资源。
| PointF com.foxit.sdk.common.Path.getPoint | ( | int | index | ) | throws com.foxit.sdk.PDFException |
| int com.foxit.sdk.common.Path.getPointCount | ( | ) | throws com.foxit.sdk.PDFException |
获取点的数量。
| int com.foxit.sdk.common.Path.getPointType | ( | int | index | ) | throws com.foxit.sdk.PDFException |
获取由索引指定的点的类型。
| [in] | index | 点的索引。有效范围:0到(count-1)。 count由函数 Path.getPointCount 返回。 |
| void com.foxit.sdk.common.Path.increasePointCount | ( | int | count | ) | throws com.foxit.sdk.PDFException |
增加点数量并为这些新点准备足够的内存。
此函数将为给定的点数量分配更多内存,并默认使用点(0, 0)和类型 com.foxit.sdk.common.Path.e_TypeMoveTo 初始化这些新点。 成功调用此函数后,用户可以使用函数 Path.setPoint 来 设置这些新点。
| [in] | count | 新的点数量。它不应为负数。 |
| boolean com.foxit.sdk.common.Path.isEmpty | ( | ) |
检查当前对象是否为空。
当当前对象为空时,意味着当前对象无用。
| boolean com.foxit.sdk.common.Path.lineTo | ( | PointF | point | ) | throws com.foxit.sdk.PDFException |
向当前图形的末尾添加一个点,并从当前点到新点绘制一条线。
如果此函数成功,新点将成为新的"当前点"。
| [in] | point | 新点,在中。 |
| boolean com.foxit.sdk.common.Path.moveTo | ( | PointF | point | ) | throws com.foxit.sdk.PDFException |
向当前路径的末尾添加一个点,以开始新的图形。
如果此函数成功,新点将成为新的"当前点",新图形将 成为新的"当前图形"。
| [in] | point | 新点,在中。 |
| boolean com.foxit.sdk.common.Path.removePoint | ( | int | index | ) | throws com.foxit.sdk.PDFException |
移除由索引指定的点。
| [in] | index | 要移除的点的索引。有效范围:0到(count-1)。 count由函数 Path.getPointCount 返回。 |
| boolean com.foxit.sdk.common.Path.setPoint | ( | int | index, |
| PointF | point, | ||
| int | type | ||
| ) | throws com.foxit.sdk.PDFException |
更改由索引指定的点的值和类型。
| [in] | index | 点的索引。有效范围:0到(count-1)。 count由函数 Path.getPointCount 返回。 |
| [in] | point | 要设置的新点,在中。 |
| [in] | type | 用于设置新点的类型。请参考从 com.foxit.sdk.common.Path.e_TypeMoveTo 开始的值,应该是这些值中的一个。 |
| void com.foxit.sdk.common.Path.transform | ( | Matrix2D | matrix | ) | throws com.foxit.sdk.PDFException |
使用给定矩阵变换当前路径中的所有点。
| [in] | matrix | 用于变换的矩阵。 |