|
TouchVG framework
|
矢量路径类 更多...
#include <mgpath.h>
类 | |
| struct | MgSegmentCallback |
| 遍历路径段的回调接口 更多... | |
Public 成员函数 | |
| MgPath () | |
| 默认构造函数 更多... | |
| MgPath (const MgPath &src) | |
| 拷贝构造函数 更多... | |
| MgPath (int count, const Point2d *points, const char *types) | |
| 构造函数,指定节点数据 更多... | |
| MgPath (const char *svgd) | |
| 给定SVG的路径d串构造 更多... | |
| virtual | ~MgPath () |
| 析构函数 更多... | |
| MgPath & | copy (const MgPath &src) |
| 赋值函数 更多... | |
| MgPath & | append (const MgPath &src) |
| 追加路径 更多... | |
| MgPath & | addSVGPath (const char *s) |
| 从SVG的路径d串解析 更多... | |
| MgPath & | reverse () |
| 路径反向 更多... | |
| bool | genericRoundLines (int count, const Point2d *points, float radius, bool closed=false) |
| 折线拐角圆角化 更多... | |
| int | getCount () const |
| 返回节点个数 更多... | |
| int | getSubPathCount () const |
| 返回子路径(MoveTo)的个数 更多... | |
| Point2d | getStartPoint () const |
| 返回起始点 更多... | |
| Vector2d | getStartTangent () const |
| 返回起始切线矢量 更多... | |
| Point2d | getEndPoint () const |
| 返回最末点 更多... | |
| Vector2d | getEndTangent () const |
| 返回终止切线矢量 更多... | |
| bool | isLine () const |
| 返回是否为线段 更多... | |
| bool | isLines () const |
| 返回是否为线段、折线或多边形 更多... | |
| bool | isCurve () const |
| 返回是否每段都为曲线段 更多... | |
| bool | isClosed () const |
| 返回是否为闭合图形 更多... | |
| float | getLength () const |
| 返回路径长度 更多... | |
| const Point2d * | getPoints () const |
| 返回节点坐标数组 更多... | |
| const char * | getTypes () const |
| 返回节点类型数组,由 MgPathNode 值组成 更多... | |
| void | setPath (int count, const Point2d *points, const char *types) |
| 设置节点数据,types的每个字符由 MgPathNode 值组成或为 mlcqLCQ 之一 更多... | |
| void | setPath (int count, const Point2d *points, const int *types) |
| bool | scanSegments (MgSegmentCallback &c) const |
| 遍历路径段 更多... | |
| int | getNodeType (int index) const |
| 返回节点类型,由 MgPathNode 值组成 更多... | |
| Point2d | getPoint (int index) const |
| 得到节点坐标,超过点数则取余数 更多... | |
| void | setPoint (int index, const Point2d &pt) |
| 设置节点坐标 更多... | |
| void | clear () |
| 清除所有节点 更多... | |
| void | transform (const Matrix2d &mat) |
| 对所有节点坐标进行坐标变换 更多... | |
| void | startFigure () |
| 开始新的一个图元 更多... | |
| bool | moveTo (const Point2d &point, bool rel=false) |
| 添加移动到新位置的指令节点 更多... | |
| bool | lineTo (const Point2d &point, bool rel=false) |
| 添加绘制直线段到新位置的指令节点 更多... | |
| bool | horzTo (float x, bool rel=false) |
| 添加绘制水平线段到新位置的指令节点 更多... | |
| bool | vertTo (float y, bool rel=false) |
| 添加绘制垂直线段到新位置的指令节点 更多... | |
| bool | linesTo (int count, const Point2d *points, bool rel=false) |
| 添加绘制折线到新位置的指令节点 更多... | |
| bool | beziersTo (int count, const Point2d *points, bool reverse=false, bool rel=false) |
| 添加绘制三次贝塞尔曲线到新位置的指令节点 更多... | |
| bool | bezierTo (const Point2d &cp1, const Point2d &cp2, const Point2d &end, bool rel=false) |
| 添加绘制三次贝塞尔曲线到新位置的指令节点 更多... | |
| bool | smoothBezierTo (const Point2d &cp2, const Point2d &end, bool rel=false) |
| 添加绘制光滑三次贝塞尔曲线到新位置的指令节点 更多... | |
| bool | quadsTo (int count, const Point2d *points, bool rel=false) |
| 添加绘制二次贝塞尔曲线到新位置的指令节点 更多... | |
| bool | quadTo (const Point2d &cp, const Point2d &end, bool rel=false) |
| 添加绘制二次贝塞尔曲线到新位置的指令节点 更多... | |
| bool | smoothQuadTo (const Point2d &end, bool rel=false) |
| 添加绘制光滑二次贝塞尔曲线到新位置的指令节点 更多... | |
| bool | arcTo (const Point2d &point, bool rel=false) |
| 添加绘制切线圆弧到新位置的指令节点 更多... | |
| bool | arcTo (const Point2d &point, const Point2d &end, bool rel=false) |
| 添加绘制三点圆弧到新位置的指令节点 更多... | |
| bool | closeFigure () |
| 添加闭合当前图元的指令节点 更多... | |
| bool | trimStart (const Point2d &pt, float dist) |
| 从起始方向去掉给定距离的段,即最终路径的起点与原起点的距离为dist 更多... | |
| bool | crossWithPath (const MgPath &path, const Box2d &box, Point2d &ptCross) const |
| 求两个路径的交点 更多... | |
Private 属性 | |
| MgPathImpl * | m_data |
矢量路径类