|
const char * | getName () const |
|
void | setName (const char *name) |
|
Vector2d | getImageSize () const |
|
void | setImageSize (Vector2d size) |
|
Point2d | getCenter () const |
| 返回中心点 更多...
|
|
Box2d | getRect () const |
| 返回矩形框,是本对象未旋转时的形状 更多...
|
|
float | getWidth () const |
| 返回宽度 更多...
|
|
float | getHeight () const |
| 返回高度 更多...
|
|
float | getDiagonalLength () const |
| 返回对角线长度 更多...
|
|
float | getAngle () const |
| 返回倾斜角度 更多...
|
|
bool | isEmpty (float minDist) const |
| 返回是否为空矩形 更多...
|
|
bool | isOrtho () const |
| 返回是否为水平矩形 更多...
|
|
void | setRect2P (const Point2d &pt1, const Point2d &pt2) |
| 设置水平矩形,对于正方形pt1固定 更多...
|
|
void | setRectWithAngle (const Point2d &pt1, const Point2d &pt2, float angle, const Point2d &basept) |
| 设置倾斜矩形,(pt1-pt2)为旋转前的对角点,basept为旋转中心 更多...
|
|
void | setRect4P (const Point2d points[4]) |
| 设置四个角点 更多...
|
|
bool | transformWith2P (const Point2d &pt1, int i1, const Point2d &pt2, int i2) |
| 给定两个相邻角点的位置进行几何变形 更多...
|
|
void | setCenter (const Point2d &pt) |
| 设置中心点 更多...
|
|
void | setSquare (bool square) |
| 设置是否为方形 更多...
|
|
virtual int | getSubType () const |
| 子类型,由具体图形类解释含义 更多...
|
|
virtual const Point2d * | getPoints () const |
|
| MgBaseShape () |
|
virtual | ~MgBaseShape () |
|
long | toHandle () const |
| 得到句柄,用于跨库转换 更多...
|
|
MgBaseShape * | cloneShape () const |
| 复制出一个新图形对象 更多...
|
|
virtual Box2d | getExtent () const |
| 返回图形模型坐标范围 更多...
|
|
virtual long | getChangeCount () const |
| 返回改变计数,该数将不永久保存 更多...
|
|
virtual void | resetChangeCount (long count) |
| 重置改变计数 更多...
|
|
virtual void | afterChanged () |
| update() 或改变图形内容后调用 更多...
|
|
virtual void | update () |
| 参数改变后重新计算坐标 更多...
|
|
virtual void | transform (const Matrix2d &mat) |
| 矩阵变换 更多...
|
|
virtual void | clear () |
| 清除图形数据 更多...
|
|
virtual void | clearCachedData () |
| 释放临时数据内存 更多...
|
|
virtual int | getPointCount () const =0 |
| 返回顶点个数 更多...
|
|
virtual Point2d | getPoint (int index) const =0 |
| 返回指定序号的顶点 更多...
|
|
virtual void | setPoint (int index, const Point2d &pt)=0 |
| 设置指定序号的顶点坐标,需再调用 update() 更多...
|
|
virtual bool | isClosed () const |
| 返回是否闭合 更多...
|
|
virtual bool | isCurve () const |
| 返回是否为曲线图形 更多...
|
|
virtual float | hitTest (const Point2d &pt, float tol, MgHitResult &res) const =0 |
| 选中点击测试 更多...
|
|
virtual bool | setHandlePoint2 (int index, const Point2d &pt, float tol, int &data) |
| 设置指定序号的控制点坐标,可以处理拖动状态 更多...
|
|
float | hitTest2 (const Point2d &pt, float tol, Point2d &nearpt, int &segment) const |
| 选中点击测试,可输出段号 更多...
|
|
float | hitTest2 (const Point2d &pt, float tol, Point2d &nearpt) const |
| 选中点击测试 更多...
|
|
virtual bool | hitTestBox (const Box2d &rect) const |
| 框选检查 更多...
|
|
virtual bool | draw (int mode, GiGraphics &gs, const GiContext &ctx, int segment) const |
| 显示图形(mode:0-正常显示,1-选中显示,2-拖动显示) 更多...
|
|
virtual bool | draw2 (const MgObject *owner, int mode, GiGraphics &gs, const GiContext &ctx, int segment) const |
| 可查询上级图形列表对象的图形显示重载方法 更多...
|
|
virtual void | output (MgPath &path) const =0 |
| 输出路径 更多...
|
|
MgPath | getPath () const |
| 返回路径 更多...
|
|
virtual bool | save (MgStorage *s) const |
| 保存图形 更多...
|
|
virtual bool | load (MgShapeFactory *factory, MgStorage *s) |
| 恢复图形 更多...
|
|
virtual int | getHandleCount () const |
| 返回控制点个数 更多...
|
|
virtual Point2d | getHandlePoint (int index) const |
| 返回指定序号的控制点坐标 更多...
|
|
virtual bool | setHandlePoint (int index, const Point2d &pt, float tol) |
| 设置指定序号的控制点坐标,指定的容差用于比较重合点 更多...
|
|
virtual bool | isHandleFixed (int index) const |
| 返回指定序号的控制点是否不允许移动 更多...
|
|
virtual int | getHandleType (int index) const |
| 返回指定序号的控制点类型(MgHandleType) 更多...
|
|
virtual bool | offset (const Vector2d &vec, int segment) |
| 移动图形, 子段号 segment 由 hitTest() 得到 更多...
|
|
bool | getFlag (MgShapeBit bit) const |
| 得到图形特征标志位 更多...
|
|
virtual void | setFlag (MgShapeBit bit, bool on) |
| 设置图形特征标志位 更多...
|
|
virtual void | copy (const MgObject &src) |
| 复制对象数据 更多...
|
|
virtual bool | equals (const MgObject &src) const |
| 比较与另一同类对象是否相同 更多...
|
|
virtual bool | isKindOf (int type) const |
| 返回是否能转化为指定类型的对象,即本类为指定类或其派生类 更多...
|
|
virtual void | addRef () |
| 添加引用计数 更多...
|
|
void | setExtent (const Box2d &rect) |
| 设置图形模型坐标范围,供Java等语言代码调用 更多...
|
|
virtual void | setOwner (MgObject *owner) |
| 设置拥有者图形对象 更多...
|
|
bool | isVisible () const |
| 返回是否可见 更多...
|
|
bool | isLocked () const |
| 返回是否锁定 更多...
|
|
virtual MgObject * | clone () const =0 |
| 复制出一个新对象 更多...
|
|
virtual void | release ()=0 |
| 释放引用计数,为0时销毁对象 更多...
|
|
virtual int | getType () const =0 |
| 返回对象类型 更多...
|
|
MgObject & | operator= (const MgObject &src) |
|
bool | operator== (const MgObject &src) const |
|
bool | operator!= (const MgObject &src) const |
|
|
void | _copy (const MgImageShape &src) |
|
bool | _equals (const MgImageShape &src) const |
|
void | _clear () |
|
bool | _draw (int mode, GiGraphics &gs, const GiContext &ctx, int segment) const |
|
bool | _save (MgStorage *s) const |
|
bool | _load (MgShapeFactory *factory, MgStorage *s) |
|
| MgBaseRect () |
|
int | _getPointCount () const |
|
Point2d | _getPoint (int index) const |
|
void | _setPoint (int index, const Point2d &pt) |
|
void | _copy (const MgBaseRect &src) |
|
bool | _equals (const MgBaseRect &src) const |
|
bool | _isKindOf (int type) const |
|
void | _update () |
|
void | _transform (const Matrix2d &mat) |
|
void | _clear () |
|
bool | _isClosed () const |
|
float | _hitTest (const Point2d &pt, float tol, MgHitResult &res) const |
|
int | _getHandleCount () const |
|
Point2d | _getHandlePoint (int index) const |
|
int | _getHandleType (int index) const |
|
bool | _setHandlePoint (int index, const Point2d &pt, float tol) |
|
bool | _hitTestBox (const Box2d &rect) const |
|
void | _output (MgPath &path) const |
|
bool | _save (MgStorage *s) const |
|
bool | _load (MgShapeFactory *factory, MgStorage *s) |
|
bool | _isClosed () const |
|
void | _copy (const MgBaseShape &src) |
|
bool | _equals (const MgBaseShape &src) const |
|
bool | _isKindOf (int type) const |
|
Box2d | _getExtent () const |
|
void | _update () |
|
void | _transform (const Matrix2d &mat) |
|
void | _clear () |
|
void | _clearCachedData () |
|
bool | _hitTestBox (const Box2d &rect) const |
|
int | _getHandleCount () const |
|
Point2d | _getHandlePoint (int index) const |
|
bool | _setHandlePoint (int index, const Point2d &pt, float tol) |
|
bool | _setHandlePoint2 (int index, const Point2d &pt, float tol, int &data) |
|
bool | _isHandleFixed (int) const |
|
int | _getHandleType (int) const |
|
bool | _offset (const Vector2d &vec, int segment) |
|
bool | _rotateHandlePoint (int index, const Point2d &pt) |
|
bool | _draw (int, GiGraphics &, const GiContext &, int) const |
|
bool | _save (MgStorage *s) const |
|
bool | _load (MgShapeFactory *factory, MgStorage *s) |
|
virtual | ~MgObject () |
|