Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
MyGraphObject.h
Package: MiniCAD_ALL.zip [view]
Upload User: netltd
Upload Date: 2013-02-12
Package Size: 7234k
Code Size: 2k
Category:
Graph Drawing
Development Platform:
Visual C++
- //浮点型点坐标
- struct FPOINT
- {
- float x;
- float y;
- };
- class CGraphObjectInfo: public CObject
- {
- public:
- BOOL m_del; //图形对象被暂时删除标记
- BOOL m_selected; //图形对象被选中标记
- CRect m_rect; //图形对象所占的逻辑区域
- public:
- CGraphObjectInfo();
- CGraphObjectInfo(CRect rect, BOOL del, BOOL selected);
- void Initialize(CRect rect, BOOL del, BOOL selected);
- };
- // 直线对象
- class CMyLine : public CObject
- {
- public:
- FPOINT m_start;
- FPOINT m_end;
- CString m_layer; //图形对象所在图层
- int m_style;
- COLORREF m_color;
- CMyLine()
- {}
- DECLARE_SERIAL(CMyLine)
- public:
- CMyLine(CString layer, FPOINT startpoint, FPOINT endpoint, int style, COLORREF color);
- void Serialize(CArchive& ar);
- public:
- int GetObjectType();
- };
- //矩形对象
- class CMyRect: public CObject
- {
- public:
- FPOINT m_start;
- FPOINT m_end;
- CString m_layer; //图形对象所在图层
- int m_style;
- COLORREF m_color;
- CMyRect()
- {}
- DECLARE_SERIAL(CMyRect)
- public:
- CMyRect(CString layer, FPOINT startpoint, FPOINT endpoint, int style, COLORREF color);
- void Serialize(CArchive& ar);
- public:
- int GetObjectType();
- };
- //圆对象
- class CMyCircle: public CObject
- {
- public:
- FPOINT m_origin;
- float m_radius;
- CString m_layer; //图形对象所在图层
- int m_style;
- COLORREF m_color;
- CMyCircle()
- {}
- DECLARE_SERIAL(CMyCircle)
- public:
- CMyCircle(CString layer, FPOINT originpoint, float radius, int style, COLORREF color);
- void Serialize(CArchive& ar);
- public:
- int GetObjectType();
- };
- //圆弧对象
- class CMyArc: public CObject
- {
- public:
- //圆心坐标
- FPOINT m_origin;
- //起点坐标
- FPOINT m_start;
- //终点坐标
- FPOINT m_end;
- float m_radius;
- CString m_layer; //图形对象所在图层
- int m_style;
- COLORREF m_color;
- CMyArc()
- {}
- DECLARE_SERIAL(CMyArc)
- public:
- CMyArc(CString layer, FPOINT originpoint, FPOINT startpoint, FPOINT endpoint, float radius,
- int style, COLORREF color);
- void Serialize(CArchive& ar);
- public:
- int GetObjectType();
- };