MyGraphObject.h
上传用户:netltd
上传日期:2013-02-12
资源大小:7234k
文件大小:2k
- //////////////////////////////////////////////////////////////////////////////////////////////
- class CGraphObjectInfo: public CObject
- {
- public:
- BOOL m_del; //图形对象被暂时删除标记
- BOOL m_selected; //图形对象被选中标记
- int LayerIndex; //图形对象所在图层
- public:
- CGraphObjectInfo(BOOL del, BOOL selected);
- };
- //////////////////////////////////////////////////////////////////////////////////////////////
- // 直线对象
- class CMyLine : public CObject
- {
- public:
- float m_startX;
- float m_startY;
- float m_endX;
- float m_endY;
- int m_style;
- COLORREF m_color;
- CMyLine()
- {}
- DECLARE_SERIAL(CMyLine)
-
- public:
- CMyLine(float startX, float startY, float endX, float endY, int style = PS_SOLID, COLORREF color = RGB(0, 0 ,0));
- void Serialize(CArchive& ar);
-
- };
- ///////////////////////////////////////////////////////////////////////////////////////////////
- //矩形对象
- class CMyRect: public CObject
- {
- public:
- float m_startX;
- float m_startY;
- float m_endX;
- float m_endY;
- int m_style;
- COLORREF m_color;
- CMyRect()
- {}
- DECLARE_SERIAL(CMyRect)
-
- public:
- CMyRect(float startX, float startY, float endX, float endY, int style = PS_SOLID, COLORREF color = RGB(0, 0 ,0));
- void Serialize(CArchive& ar);
- };
- ///////////////////////////////////////////////////////////////////////////////////////////////
- //圆对象
- class CMyCircle: public CObject
- {
- public:
- float m_originX;
- float m_originY;
- float m_radius;
- int m_style;
- COLORREF m_color;
- CMyCircle()
- {}
- DECLARE_SERIAL(CMyCircle)
-
- public:
- CMyCircle(float originX, float originY, float radius, int style = PS_SOLID, COLORREF color = RGB(0, 0 ,0));
- void Serialize(CArchive& ar);
- };
- ///////////////////////////////////////////////////////////////////////////////////////////////
- //圆弧对象
- class CMyArc: public CObject
- {
- public:
- //圆心坐标
- float m_originX;
- float m_originY;
- //起点坐标
- float m_startX;
- float m_startY;
- //终点坐标
- float m_endX;
- float m_endY;
-
- float m_radius;
- int m_style;
- COLORREF m_color;
- CMyArc()
- {}
- DECLARE_SERIAL(CMyArc)
-
- public:
- CMyArc(float originX, float originY, float startX, float startY, float endX, float endY,
- float radius, int style = PS_SOLID, COLORREF color = RGB(0, 0 ,0));
- void Serialize(CArchive& ar);
- };