Shape.cpp
资源名称:CAD.zip [点击查看]
上传用户:hehe2haha
上传日期:2013-08-16
资源大小:161k
文件大小:1k
源码类别:
CAD
开发平台:
Visual C++
- // Shape.cpp: implementation of the CShape class.
- //
- //////////////////////////////////////////////////////////////////////
- #include "stdafx.h"
- #include "Shape.h"
- //////////////////////////////////////////////////////////////////////
- // Construction/Destruction
- //////////////////////////////////////////////////////////////////////
- CShape::CShape()
- {
- fnPenStyle = PS_SOLID;
- nWidth = 1;
- crColor = RGB(0,0,0);
- isPick = 0;
- strcpy(m_className,"");
- }
- CShape::~CShape()
- {
- }
- void CShape::Save(ostream &Output)
- {
- Output<<" "<<fnPenStyle<<" "<<nWidth<<" "<<crColor
- <<" "<<m_ptFirstPos.x<<" "<<m_ptFirstPos.y<<" "
- <<m_ptSecondPos.x<<" "<<m_ptSecondPos.y;
- }
- void CShape::Open(istream &Input)
- {
- Input>>fnPenStyle>>nWidth>>crColor
- >>m_ptFirstPos.x>>m_ptFirstPos.y>>m_ptSecondPos.x
- >>m_ptSecondPos.y;
- }