TouchVG framework
类 | Public 成员函数 | 静态 Public 成员函数 | Protected 成员函数 | Private 属性 | 所有成员列表
MgShapeDoc类 参考

图形文档 更多...

#include <mgshapedoc.h>

类 MgShapeDoc 继承关系图:
Inheritance graph

类

struct  Impl
 

Public 成员函数

MgShapeDoc * cloneDoc () const
 复制出一个新图形文档对象,不复制图形 更多...
 
MgShapeDoc * shallowCopy () const
 复制出一个新图形文档对象,并添加所有图形的引用 更多...
 
int copyShapes (const MgShapeDoc *src, bool deeply)
 复制(默认为深拷贝)每一个图形,浅拷贝则添加图形的引用计数且不改变图形的拥有者 更多...
 
bool save (MgStorage *s, int startIndex) const
 保存图形 更多...
 
bool saveAll (MgStorage *s, const GiTransform *xform)
 保存图形和放缩状态 更多...
 
bool load (MgShapeFactory *factory, MgStorage *s, bool addOnly)
 加载图形 更多...
 
bool loadAll (MgShapeFactory *factory, MgStorage *s, GiTransform *xform)
 加载图形,并自动放缩到之前的状态 更多...
 
void clear ()
 删除所有图形 更多...
 
void clearCachedData ()
 释放临时数据内存 更多...
 
int draw (GiGraphics &gs) const
 显示所有图形 更多...
 
int dyndraw (int mode, GiGraphics &gs) const
 动态显示所有图形 更多...
 
int dyndraw (int mode, GiGraphics &gs, const int *ignoreIds) const
 显示除了特定ID图形外的所有图形 更多...
 
Box2d getExtent () const
 返回图形范围 更多...
 
int getShapeCount () const
 返回图形总数 更多...
 
const MgShape * findShape (int sid) const
 查找指定ID的图形 更多...
 
const MgShape * getLastShape () const
 得到最新添加的图形 更多...
 
MgShapes * getCurrentShapes () const
 返回当前图形列表(图层或复合图形) 更多...
 
bool setCurrentShapes (MgShapes *shapes)
 设置当前图形列表(图层或复合图形) 更多...
 
MgLayer * getCurrentLayer () const
 返回当前图层 更多...
 
bool switchLayer (int index)
 切换图层,自动追加末尾图层 更多...
 
int getLayerCount () const
 得到图层数量 更多...
 
GiContext * context ()
 返回新图形的图形属性 更多...
 
Matrix2d & modelTransform ()
 模型变换矩阵 更多...
 
const Box2d & getPageRectW () const
 得到页面范围的世界坐标 更多...
 
float getViewScale () const
 得到显示比例 更多...
 
void setPageRectW (const Box2d &rectW, float viewScale, bool resetInitial=false)
 设置页面范围的世界坐标 更多...
 
bool zoomToInitial (GiTransform *xform)
 放缩到文档初始状态 更多...
 
bool isReadOnly () const
 返回文档是否只读 更多...
 
void setReadOnly (bool readOnly)
 设置文档是否只读 更多...
 
long toHandle () const
 得到句柄,用于跨库转换 更多...
 
virtual MgObject * clone () const
 复制出一个新对象 更多...
 
virtual void copy (const MgObject &src)
 复制对象数据 更多...
 
virtual void release ()
 释放引用计数,为0时销毁对象 更多...
 
virtual void addRef ()
 添加引用计数 更多...
 
virtual bool equals (const MgObject &src) const
 比较与另一同类对象是否相同 更多...
 
virtual int getType () const
 返回对象类型 更多...
 
virtual bool isKindOf (int type) const
 返回是否能转化为指定类型的对象,即本类为指定类或其派生类 更多...
 
- Public 成员函数 继承自 MgObject
MgObject & operator= (const MgObject &src)
 
bool operator== (const MgObject &src) const
 
bool operator!= (const MgObject &src) const
 

静态 Public 成员函数

static int Type ()
 返回本对象的类型 更多...
 
static MgShapeDoc * createDoc ()
 创建图形文档对象 更多...
 
static MgShapeDoc * fromHandle (long h)
 转为对象 更多...
 
- 静态 Public 成员函数 继承自 MgObject
template<class T >
static void release_pointer (T *&p)
 

Protected 成员函数

 MgShapeDoc ()
 
virtual ~MgShapeDoc ()
 
- Protected 成员函数 继承自 MgObject
virtual ~MgObject ()
 

Private 属性

Impl * im
 

详细描述

图形文档


该类的文档由以下文件生成:

通用矢量图形框架, 版权所有 (C) 张云贵 2004-2017,BSD 开源许可证