MyGraphObject.h
上传用户:netltd
上传日期:2013-02-12
资源大小:7234k
文件大小:2k
- //浮点型点坐标
- struct FPOINT
- {
- float x;
- float y;
- };
- class CGraphObjectInfo: public CObject
- {
- public:
- int m_layer; //图形对象所在图层
- BOOL m_del; //图形对象被暂时删除标记
- BOOL m_selected; //图形对象被选中标记
- public:
- CGraphObjectInfo(int layer, BOOL del, BOOL selected);
- };
- // 直线对象
- class CMyLine : public CObject
- {
- public:
- FPOINT m_start;
- FPOINT m_end;
-
- int m_style;
- COLORREF m_color;
- CMyLine()
- {}
- DECLARE_SERIAL(CMyLine)
-
- public:
- CMyLine(FPOINT startpoint, FPOINT endpoint, int style, COLORREF color);
- void Serialize(CArchive& ar);
-
- };
- //矩形对象
- class CMyRect: public CObject
- {
- public:
- FPOINT m_start;
- FPOINT m_end;
- int m_style;
- COLORREF m_color;
- CMyRect()
- {}
- DECLARE_SERIAL(CMyRect)
-
- public:
- CMyRect(FPOINT startpoint, FPOINT endpoint, int style, COLORREF color);
- void Serialize(CArchive& ar);
- };
- //圆对象
- class CMyCircle: public CObject
- {
- public:
- FPOINT m_origin;
- float m_radius;
- int m_style;
- COLORREF m_color;
- CMyCircle()
- {}
- DECLARE_SERIAL(CMyCircle)
-
- public:
- CMyCircle(FPOINT originpoint, float radius, int style, COLORREF color);
- void Serialize(CArchive& ar);
- };
- //圆弧对象
- class CMyArc: public CObject
- {
- public:
- //圆心坐标
- FPOINT m_origin;
- //起点坐标
- FPOINT m_start;
- //终点坐标
- FPOINT m_end;
- float m_radius;
- int m_style;
- COLORREF m_color;
- CMyArc()
- {}
- DECLARE_SERIAL(CMyArc)
-
- public:
- CMyArc(FPOINT originpoint, FPOINT startpoint, FPOINT endpoint, float radius,
- int style, COLORREF color);
- void Serialize(CArchive& ar);
- };