|
TouchVG framework
|
矢量图形模板类 更多...
#include <mgshapet.h>

Public 成员函数 | |
| MgShapeT () | |
| MgShapeT (const ContextT &ctx) | |
| virtual | ~MgShapeT () |
| const GiContext & | context () const |
| 返回显示属性 更多... | |
| void | setContext (const GiContext &ctx, int mask) |
| 设置显示属性 更多... | |
| MgBaseShape * | shape () |
| 返回几何图形对象 更多... | |
| const MgBaseShape * | shapec () const |
| 返回几何图形对象(const) 更多... | |
| int | getType () const |
| 返回对象类型 更多... | |
| void | release () |
| 释放引用计数,为0时销毁对象 更多... | |
| void | addRef () |
| 添加引用计数 更多... | |
| MgObject * | clone () const |
| 复制出一个新对象 更多... | |
| int | getID () const |
| 返回图形编号 更多... | |
| MgShapes * | getParent () const |
| 得到上一级图形列表 更多... | |
| void | setParent (MgShapes *p, int sid) |
| 由图形列表设置拥有者和编号 更多... | |
| int | getTag () const |
| 返回应用程序自定义标记 更多... | |
| void | setTag (int tag) |
| 设置应用程序自定义标记,可由此扩展数据 更多... | |
Public 成员函数 继承自 MgShape | |
| long | toHandle () const |
| 得到句柄,用于跨库转换 更多... | |
| MgShape * | cloneShape () const |
| 复制出一个新图形对象 更多... | |
| void | setContext (const GiContext &ctx) |
| virtual bool | hasFillColor () const |
| 返回是否为闭合填充图形 更多... | |
| virtual bool | draw (int mode, GiGraphics &gs, const GiContext *ctx, int segment) const |
| 显示图形 更多... | |
| virtual bool | save (MgStorage *s) const |
| 保存图形到指定的序列化对象 更多... | |
| virtual bool | load (MgShapeFactory *factory, MgStorage *s) |
| 从指定的序列化对象加载图形 更多... | |
| virtual void | copy (const MgObject &src) |
| 复制对象数据 更多... | |
| virtual bool | equals (const MgObject &src) const |
| 比较与另一同类对象是否相同 更多... | |
| virtual bool | isKindOf (int type) const |
| 返回是否能转化为指定类型的对象,即本类为指定类或其派生类 更多... | |
| virtual int | getPointCount () const |
| 返回顶点个数 更多... | |
| virtual Point2d | getPoint (int index) const |
| 返回指定序号的顶点 更多... | |
| int | getHandleCount () const |
| 返回控制点个数 更多... | |
| Point2d | getHandlePoint (int index) const |
| 返回指定序号的控制点坐标 更多... | |
| int | getHandleType (int index) const |
| 返回指定序号的控制点类型(MgHandleType) 更多... | |
Public 成员函数 继承自 MgObject | |
| MgObject & | operator= (const MgObject &src) |
| bool | operator== (const MgObject &src) const |
| bool | operator!= (const MgObject &src) const |
静态 Public 成员函数 | |
| static void | registerCreator (MgShapeFactory *factory) |
| 登记类型号对应的图形创建函数 更多... | |
| static MgShape * | create () |
| static int | Type () |
| 返回本对象的类型 更多... | |
静态 Public 成员函数 继承自 MgShape | |
| static MgShape * | Null () |
| 零指针 更多... | |
| static MgShape * | fromHandle (long h) |
| 转为对象 更多... | |
| static bool | drawShape (const MgShapes *shapes, const MgBaseShape &sp, int mode, GiGraphics &gs, const GiContext &ctx, int segment) |
| 显示内部图形 更多... | |
静态 Public 成员函数 继承自 MgObject | |
| template<class T > | |
| static void | release_pointer (T *&p) |
Public 属性 | |
| ShapeT | _shape |
| ContextT | _context |
| int | _id |
| MgShapes * | _parent |
| int | _tag |
| volatile long | _refcount |
Private 类型 | |
| typedef MgShapeT< ShapeT, ContextT > | ThisClass |
额外继承的成员函数 | |
Protected 成员函数 继承自 MgShape | |
| virtual | ~MgShape () |
Protected 成员函数 继承自 MgObject | |
| virtual | ~MgObject () |
矢量图形模板类
使用 MgShapeT<ShapeClass>::registerCreator() 登记图形种类;