|
|
|
|
#include "StdAfx.h"
|
|
|
|
|
#include "CommandStretch.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CCommandStretch::CCommandStretch(void)
|
|
|
|
|
{
|
|
|
|
|
m_bSetXY = false;//<2F>Ƿ<EFBFBD>ͬʱ<CDAC><CAB1><EFBFBD><EFBFBD>XY <20><><EFBFBD><EFBFBD>
|
|
|
|
|
}
|
|
|
|
|
CCommandStretch::~CCommandStretch(void)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
CString CCommandStretch::GetStr()
|
|
|
|
|
{
|
|
|
|
|
CString str1 = "_stretch <20><><EFBFBD><EFBFBD>-------- [<5B><><EFBFBD><EFBFBD>] : <";
|
|
|
|
|
CString str2;
|
|
|
|
|
if(m_Par.xy == _X)
|
|
|
|
|
str2 = "X> [<5B>ɳߴ<C9B3>] : <";
|
|
|
|
|
else
|
|
|
|
|
str2 = "Y> [<5B>ɳߴ<C9B3>] : <";
|
|
|
|
|
CString str3;
|
|
|
|
|
str3.Format("%lf",m_Par.OldSize);
|
|
|
|
|
CString str4 = "> [<5B>³ߴ<C2B3>] : <";
|
|
|
|
|
CString str5;
|
|
|
|
|
str5.Format("%lf",m_Par.NewSize);
|
|
|
|
|
CString str6 = ">";
|
|
|
|
|
return str1+str2+str3+str4+str5+str6;
|
|
|
|
|
};
|
|
|
|
|
void CCommandStretch::SetOperateParY(SObjOperatePar par)
|
|
|
|
|
{
|
|
|
|
|
m_bSetXY = true;//<2F>Ƿ<EFBFBD>ͬʱ<CDAC><CAB1><EFBFBD><EFBFBD>XY <20><><EFBFBD><EFBFBD>
|
|
|
|
|
m_ParY = par;
|
|
|
|
|
};
|
|
|
|
|
void CCommandStretch::ExcuteExt()
|
|
|
|
|
{
|
|
|
|
|
if(m_bSetXY)
|
|
|
|
|
{
|
|
|
|
|
m_ObjContainer.OperateObj(m_Par,true);
|
|
|
|
|
m_ObjContainer.OperateObj(m_ParY,true);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
m_ObjContainer.OperateObj(m_Par,true);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
void CCommandStretch::UndoExt()
|
|
|
|
|
{
|
|
|
|
|
SObjOperatePar par = m_Par;
|
|
|
|
|
par.OpType = _OP_STRETCH;
|
|
|
|
|
par.BasePt = m_Par.BasePt;
|
|
|
|
|
par.OldSize = m_Par.NewSize;
|
|
|
|
|
par.Diff = m_Par.Diff*(-1);
|
|
|
|
|
par.xy = m_Par.xy;
|
|
|
|
|
|
|
|
|
|
SObjOperatePar parY = m_ParY;
|
|
|
|
|
parY.OpType = _OP_STRETCH;
|
|
|
|
|
parY.BasePt = m_ParY.BasePt;
|
|
|
|
|
parY.OldSize = m_ParY.NewSize;
|
|
|
|
|
parY.Diff = m_ParY.Diff*(-1);
|
|
|
|
|
parY.xy = m_ParY.xy;
|
|
|
|
|
|
|
|
|
|
if(m_bSetXY)
|
|
|
|
|
{
|
|
|
|
|
m_ObjContainer.OperateObj(par,true);
|
|
|
|
|
m_ObjContainer.OperateObj(parY,true);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
m_ObjContainer.OperateObj(par,true);
|
|
|
|
|
}
|
|
|
|
|
}
|