📄 shape.cpp
字号:
// Shape.cpp: implementation of the CShape class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "lq01.h"
#include "Shape.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
IMPLEMENT_SERIAL(CShape, CObject, 0)
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CShape::CShape()
{
}
CShape::~CShape()
{
}
CPoint CShape::GetPs()
{
return m_ptStart;
}
CPoint CShape::GetPe()
{
return m_ptEnd;
}
//DEL void CShape::SetPs(CPoint ps)
//DEL {
//DEL m_ptStart=ps;
//DEL
//DEL }
//DEL void CShape::SetPe(CPoint pe)
//DEL {
//DEL m_ptEnd=pe;
//DEL }
void CShape::Draw(CDC *pDC, CPoint ptStart, CPoint ptEnd, COLORREF iColor)
{
}
COLORREF CShape::GetColor()
{
return m_iColor;
}
void CShape::Serialize(CArchive &ar)
{
// CObject::Serialize (ar);
// int version=1;
if (ar.IsStoring())
{
ar<<m_iColor<<m_ptEnd<<m_ptStart;
}
else
ar>>m_iColor>>m_ptEnd>>m_ptStart;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -