You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
#include "StdAfx.h"
|
|
|
|
|
#include "CommandModifiCircle.h"
|
|
|
|
|
#include "ObjCircle.h"
|
|
|
|
|
|
|
|
|
|
CCommandModifiCircle::CCommandModifiCircle(void)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
CCommandModifiCircle::~CCommandModifiCircle(void)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
//b Ϊtrue ʱ<><CAB1><EFBFBD>þɲ<C3BE><C9B2><EFBFBD>
|
|
|
|
|
void CCommandModifiCircle::SetPar(double Radius,int EdgeCnt,bool b)
|
|
|
|
|
{
|
|
|
|
|
if(b)
|
|
|
|
|
{
|
|
|
|
|
m_OldRadius = Radius;//<2F>뾶
|
|
|
|
|
m_OldEdgeCnt = EdgeCnt;//<2F><><EFBFBD><EFBFBD>
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
m_Radius = Radius;//<2F>뾶
|
|
|
|
|
m_EdgeCnt = EdgeCnt;//<2F><><EFBFBD><EFBFBD>
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
void CCommandModifiCircle::ExcuteExt()
|
|
|
|
|
{
|
|
|
|
|
ReCreatObj(true);
|
|
|
|
|
}
|
|
|
|
|
void CCommandModifiCircle::UndoExt()
|
|
|
|
|
{
|
|
|
|
|
ReCreatObj(false);
|
|
|
|
|
}
|
|
|
|
|
void CCommandModifiCircle::ReCreatObj(bool bExcute)
|
|
|
|
|
{
|
|
|
|
|
CObjBase *pBase = m_ObjContainer.GetCurOpObj();
|
|
|
|
|
if(pBase)
|
|
|
|
|
{
|
|
|
|
|
CObjCircle *p = dynamic_cast<CObjCircle*>(pBase);
|
|
|
|
|
if(bExcute)
|
|
|
|
|
{
|
|
|
|
|
p->ReCreat(m_Radius,m_EdgeCnt);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
p->ReCreat(m_OldRadius,m_OldEdgeCnt);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|