|
Foxit PDF SDK
|
Public 类型 | |
| enum | PointType { e_TypeMoveTo = 1, e_TypeLineTo = 2, e_TypeLineToCloseFigure = 3, e_TypeBezierTo = 4, e_TypeBezierToCloseFigure = 5 } |
| 路径中点类型枚举。 更多... | |
Public 成员函数 | |
| Path () | |
| 构造函数。 | |
| Path (const Path &other) | |
| 使用另一个路径对象的构造函数。 更多... | |
| ~Path () | |
| 析构函数。 | |
| bool | AppendEllipse (const RectF &rect) |
| 向当前路径的末尾添加椭圆图形。 更多... | |
| bool | AppendRect (const RectF &rect) |
| 向当前路径的末尾添加矩形图形。 更多... | |
| void | Clear () |
| 清除所有点。 更多... | |
| bool | CloseFigure () |
| 关闭当前图形(也是当前路径中的最后一个图形)。 更多... | |
| bool | CubicBezierTo (const PointF &point1, const PointF &point2, const PointF &point3) |
| 通过三个点向当前图形的末尾添加三次贝塞尔样条: 两个控制点和一个目标点。 更多... | |
| PointF | GetPoint (int index) |
| 获取由索引指定的点。 更多... | |
| int | GetPointCount () |
| 获取点的数量。 更多... | |
| PointType | GetPointType (int index) |
| 获取由索引指定的点的类型。 更多... | |
| void | IncreasePointCount (int count) |
| 增加点数量并为这些新点准备足够的内存。 更多... | |
| bool | IsEmpty () const |
| 检查当前对象是否为空。 更多... | |
| bool | LineTo (const PointF &point) |
| 向当前图形的末尾添加一个点,并从当前点到新点绘制一条线。 更多... | |
| bool | MoveTo (const PointF &point) |
| 向当前路径的末尾添加一个点,以开始新的图形。 更多... | |
| bool | operator != (const Path &other) const |
| 不相等操作符。 更多... | |
| Path & | operator= (const Path &other) |
| 赋值操作符。 更多... | |
| bool | operator== (const Path &other) const |
| 相等操作符。 更多... | |
| bool | RemovePoint (int index) |
| 移除由索引指定的点。 更多... | |
| bool | SetPoint (int index, const PointF &point, PointType type) |
| 更改由索引指定的点的值和类型。 更多... | |
| void | Transform (const Matrix &matrix) |
| 使用给定矩阵变换当前路径中的所有点。 更多... | |
Public 成员函数 继承自 foxit::Base | |
| FS_HANDLE | Handle () const |
| 获取当前对象的句柄。 更多... | |
此类表示包含一个或多个图形的路径。
路径中点类型枚举。
此枚举的值应单独使用。
| 枚举值 | |
|---|---|
| e_TypeMoveTo | 表示该点是图形的第一个点。 |
| e_TypeLineTo | 表示从前一个点到当前点绘制一条直线。 |
| e_TypeLineToCloseFigure | 表示从前一个点到当前点绘制一条直线, 并且该点还将连接到此点之前最近的 Path::e_TypeMoveTo 点,以便闭合当前图形。 |
| e_TypeBezierTo | 表示该点是贝塞尔样条的控制点或结束点。 |
| e_TypeBezierToCloseFigure | 表示该点是贝塞尔样条的结束点, 并且该点还将连接到此点之前最近的 Path::e_TypeMoveTo 点,以便闭合当前图形。 |
| foxit::common::Path::Path | ( | const Path & | other | ) |
使用另一个路径对象的构造函数。
| [in] | other | 另一个路径对象。 |
| bool foxit::common::Path::AppendEllipse | ( | const RectF & | rect | ) |
向当前路径的末尾添加椭圆图形。
| [in] | rect | 椭圆图形的外接矩形。 |
| bool foxit::common::Path::AppendRect | ( | const RectF & | rect | ) |
向当前路径的末尾添加矩形图形。
| [in] | rect | 指定矩形图形的矩形。 |
| void foxit::common::Path::Clear | ( | ) |
清除所有点。
| bool foxit::common::Path::CloseFigure | ( | ) |
关闭当前图形(也是当前路径中的最后一个图形)。
关闭当前图形时,最后一点的类型可能会改变:
| PointF foxit::common::Path::GetPoint | ( | int | index | ) |
| int foxit::common::Path::GetPointCount | ( | ) |
获取点的数量。
| PointType foxit::common::Path::GetPointType | ( | int | index | ) |
获取由索引指定的点的类型。
| [in] | index | 点的索引。有效范围:0到(count-1)。 count由函数 Path::GetPointCount 返回。 |
| void foxit::common::Path::IncreasePointCount | ( | int | count | ) |
增加点数量并为这些新点准备足够的内存。
此函数将为给定的点数量分配更多内存,并默认使用点(0, 0)和类型 Path::e_TypeMoveTo 初始化这些新点。 成功调用此函数后,用户可以使用函数 Path::SetPoint 来 设置这些新点。
| [in] | count | 新的点数量。它不应为负数。 |
| bool foxit::common::Path::IsEmpty | ( | ) | const |
检查当前对象是否为空。
当当前对象为空时,意味着当前对象无用。
| bool foxit::common::Path::LineTo | ( | const PointF & | point | ) |
| bool foxit::common::Path::MoveTo | ( | const PointF & | point | ) |
向当前路径的末尾添加一个点,以开始新的图形。
如果此函数成功,新点将成为新的"当前点",新图形将 成为新的"当前图形"。
| [in] | point | 新点,在PDF坐标系中。 |
| bool foxit::common::Path::operator != | ( | const Path & | other | ) | const |
不相等操作符。
| [in] | other | 另一个路径对象。此函数将检查当前对象是否不等于此对象。 |
赋值操作符。
| [in] | other | 另一个路径对象,其值将被赋给当前对象。 |
| bool foxit::common::Path::operator== | ( | const Path & | other | ) | const |
相等操作符。
| [in] | other | 另一个路径对象。此函数将检查当前对象是否等于此对象。 |
| bool foxit::common::Path::RemovePoint | ( | int | index | ) |
移除由索引指定的点。
| [in] | index | 要移除的点的索引。有效范围:0到(count-1)。 count由函数 Path::GetPointCount 返回。 |
更改由索引指定的点的值和类型。
| [in] | index | 点的索引。有效范围:0到(count-1)。 count由函数 Path::GetPointCount 返回。 |
| [in] | point | 要设置的新点,在PDF坐标系中。 |
| [in] | type | 用于设置新点的类型。请参考从 Path::e_TypeMoveTo 开始的值,应该是这些值中的一个。 |
| void foxit::common::Path::Transform | ( | const Matrix & | matrix | ) |
使用给定矩阵变换当前路径中的所有点。
| [in] | matrix | 用于变换的矩阵。 |