#include "stdafx.h"
// #include "2Archive.h"	// For MCARCHIVE.
#include "2ObjRect.h"	// This header.

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

#ifdef SUPER_CLASS
#undef SUPER_CLASS
#endif//SUPER_CLASS
#define SUPER_CLASS MC2ObjFigure

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	MC2ObjRect::MC2ObjRect
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDfCiDjDiDfIiDgHiDiJiDeOiDfOiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iJpAjAoA_xHqqkZx_>	CFDFoundDoc_xZkqqHx_iCmM_xHqqkZx_Stream_xZkqqHx_jDmHiCnNiNjOiCnNiOjOiCmJiBeB_xHqqkZx_MC2ObjRect_xZkqqHx_iDeJiDhFiDfHiDeGiDeOiDgH_xHqqkZx_
 *			_xZkqqHx_iNoMjAkMiCmJiOgHiCoNiCoKiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	98.11.16 Fukushiro M. _xZkqqHx_jFmPjAjEiCmMiPiJiKpKiJlLiCpAjCmHiJmB_xHqqkZx_.Tool_xZkqqHx_iCmFjAlGjAkMiClDiCoKiClNiOjOiCmMiInH_xHqqkZx_.
 *************************************************************************/
MC2ObjRect::MC2ObjRect ()
{
	m_mmHAxisX	= 100.0;		// _xZkqqHx_jAhNiMgAiCmMjAiFjFlNiOlCiCmMjBoFiCkLiClD_xHqqkZx_.
	m_mmVAxisX	= 0.0;			// _xZkqqHx_jAhNiMgAiCmMjAiCjClMiOlCiCmM_xHqqkZx_X_xZkqqHx_jAkMjFkK_xHqqkZx_.
	m_mmVAxisY	= 100.0;		// _xZkqqHx_jAhNiMgAiCmMjAiCjClMiOlCiCmM_xHqqkZx_Y_xZkqqHx_jAkMjFkK_xHqqkZx_.
	m_mmptCenter= DBLPoint(0,0);// _xZkqqHx_jAhNiMgAiCmMjCiGjAfDjDfPiCmMiNmAjFfH_xHqqkZx_.
	m_dAngle	= 0.0;			/* _xZkqqHx_jAhNiMgAiCmMiJpBjDfNiKhAjDhI_xHqqkZx_ */
	m_mmrtResize.SetRect(m_mmptCenter.x - m_mmHAxisX, m_mmptCenter.y - m_mmVAxisY,
						m_mmptCenter.x + m_mmHAxisX, m_mmptCenter.y + m_mmHAxisX);
} // MC2ObjRect::MC2ObjRect.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	MC2ObjRect::Type
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_jFjEjFgJiCmMiMfOiCpAjFnEiClH_xHqqkZx_.
 *
 * <_xZkqqHx_jFnEjCgM_xHqqkZx_>	_xZkqqHx_jFjEjFgJiCmMiMfO_xHqqkZx_
 *************************************************************************/
FTObjectType MC2ObjRect::Type () const
{
	return FDOJ_RECT;
} // MC2ObjRect::Type.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	MC2ObjRect::OutStreamV3
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_jFjEjFgJiCmMiPpDjBnEiCpAiDfIiDgHiDiKiBfLiDiAiCmJiPjBiCkLiPgPiClHiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	ar	: _xZkqqHx_iPjBiCkLiPgPiClFjHhAiCmM_xHqqkZx_MCARCHIVE
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	99.03.03 Fukushiro M. MCARCHIVE_xZkqqHx_iCpA_xHqqkZx_MCARCHIVE_xZkqqHx_iCmJiPeDjAlDiBeC_xHqqkZx_
 *************************************************************************/
void MC2ObjRect::OutStreamV3 (MCARCHIVE& ar)
{
	SUPER_CLASS::OutStreamV3(ar);
	ar << m_mmrtResize;		// _xZkqqHx_iDiKiDfEiDeDiDfJiDhEiDiMiBfLiDiA_xHqqkZx_.
	ar << m_mmHAxisX;		// _xZkqqHx_jAhNiMgAiCmMjAiFjFlNiOlCiCmMjBoFiCkLiClD_xHqqkZx_.
	ar << m_mmVAxisX;		// _xZkqqHx_jAhNiMgAiCmMjAiCjClMiOlCiCmM_xHqqkZx_X_xZkqqHx_jAkMjFkK_xHqqkZx_.
	ar << m_mmVAxisY;		// _xZkqqHx_jAhNiMgAiCmMjAiCjClMiOlCiCmM_xHqqkZx_Y_xZkqqHx_jAkMjFkK_xHqqkZx_.
	ar << m_mmptCenter;		// _xZkqqHx_jAhNiMgAiCmMjCiGjAfDjDfPiCmMiNmAjFfH_xHqqkZx_.
	ar << m_dAngle;		/* _xZkqqHx_jAhNiMgAiCmMiJpBjDfNiKhAjDhI_xHqqkZx_ */
} // MC2ObjRect::OutStreamV3.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	MC2ObjRect::InStreamV12
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_jFjEjFgJiCmMiPpDjBnEiCpAiDfIiDgHiDiKiBfLiDiAiCkJiCoHjDmHiCnNiNjOiCnOiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	ar	: _xZkqqHx_jDmHiCnNiNjOiCnNjHhAiCmM_xHqqkZx_MCARCHIVE
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	99.03.03 Fukushiro M. MCARCHIVE_xZkqqHx_iCpA_xHqqkZx_MCARCHIVE_xZkqqHx_iCmJiPeDjAlDiBeC_xHqqkZx_
 *************************************************************************/
void MC2ObjRect::InStreamV12 (MCARCHIVE& ar)
{
	SUPER_CLASS::InStreamV12(ar);
	ar >> m_mmrtResize;		// _xZkqqHx_iDiKiDfEiDeDiDfJiDhEiDiMiBfLiDiA_xHqqkZx_.
	ar >> m_mmHAxisX;		// _xZkqqHx_jAhNiMgAiCmMjAiFjFlNiOlCiCmMjBoFiCkLiClD_xHqqkZx_.
	ar >> m_mmVAxisX;		// _xZkqqHx_jAhNiMgAiCmMjAiCjClMiOlCiCmM_xHqqkZx_X_xZkqqHx_jAkMjFkK_xHqqkZx_.
	ar >> m_mmVAxisY;		// _xZkqqHx_jAhNiMgAiCmMjAiCjClMiOlCiCmM_xHqqkZx_Y_xZkqqHx_jAkMjFkK_xHqqkZx_.
	ar >> m_mmptCenter;		// _xZkqqHx_jAhNiMgAiCmMjCiGjAfDjDfPiCmMiNmAjFfH_xHqqkZx_.
	ar >> m_dAngle;		/* _xZkqqHx_jAhNiMgAiCmMiJpBjDfNiKhAjDhI_xHqqkZx_ */
} // MC2ObjRect::InStreamV12.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	MC2ObjRect::Resize
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	SelectTool_xZkqqHx_iCmJiCoGiCmBiCmEiDiKiDfEiDeDiDfJiClDiCoKiCoJiOjOiOmAiNhDiClDiCoKiCoJiBeC_xHqqkZx_
 *			_xZkqqHx_iDiKiDfEiDeDiDfJiMoDiCmNiBeBiDfEiDeDiDfJiCkKiCmIiCoJiCnHiCkNjAlDiKgNiCmJ_xHqqkZx_mmrtNew_xZkqqHx_iCmJiCmIiCoJjFeLjHhGiCkKiCkAiCoJiBeC_xHqqkZx_
 *			_xZkqqHx_jAnNiMhGiDgNiBfLiDgH_xHqqkZx_P223,P224,P225
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	bXPosi	: X_xZkqqHx_jFpLiMpMiCmMjElNjDfN_xHqqkZx_
 *			bYPosi	: Y_xZkqqHx_jFpLiMpMiCmMjElNjDfN_xHqqkZx_
 *			mmrtNew	: _xZkqqHx_iDiKiDfEiDeDiDfJiMoDiCmMiNmAjFfH_xHqqkZx_._xZkqqHx_iOmAiNmAjFfH_xHqqkZx_.
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	99.03.02 Fukushiro M. _xZkqqHx_iLkEjCmKiCmMiDiKiDfEiDeDiDfJiKnGjAjEiCpAjDlBjDpMiBeC_xHqqkZx_
 *************************************************************************/
void MC2ObjRect::Resize (BOOL bXPosi, BOOL bYPosi, const DBLRect& mmrtNew)
{
	m_mmrtResize = mmrtNew;
	m_mmHAxisX	= m_mmrtResize.Width() / 2.0;
	m_mmVAxisX	= 0.0;			// _xZkqqHx_jAhNiMgAiCmMjAiCjClMiOlCiCmM_xHqqkZx_X_xZkqqHx_jAkMjFkK_xHqqkZx_.
	m_mmVAxisY	= m_mmrtResize.Height() / 2.0;
	m_mmptCenter= m_mmrtResize.CenterPoint();
	m_dAngle	= 0.0;			/* _xZkqqHx_jAhNiMgAiCmMiJpBjDfNiKhAjDhI_xHqqkZx_ */
}	// MC2ObjRect::Resize.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	MC2ObjRect::GetResizeFrame
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_jAhNiMgAiCmMiDiKiDfEiDeDiDfJiDhEiDiMiBfLiDiAiCpAiLiBiCnPiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jCiNiInD_xHqqkZx_>	_xZkqqHx_jCgMiCmMjAlDiKgNiClDiCmGiOmAiNhDiCmMjBiBiClDiCkKiLiBiCnPiCoHiCoKiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jFnEjCgM_xHqqkZx_>	_xZkqqHx_iDhEiDiMiBfLiDiAiDfEiDeDiDfJ_xHqqkZx_._xZkqqHx_iOmAiNmAjFfH_xHqqkZx_.
 *************************************************************************/
DBLRect MC2ObjRect::GetResizeFrame () const
{
	return m_mmrtResize;
} // MC2ObjRect::GetResizeFrame.
