#include "stdafx.h"
#include "2RichText.h"	// For MC2RichText.
#include "2ObjFigure.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 MC2ObjBase

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	MC2ObjFigure
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDhEiDeAiDeDiDiLjDmHiCnNiNjOiCnNjHhAiDfCiDjDiDfIiDgHiDiJiDeOiDfOiBeC_xHqqkZx_InStream_xZkqqHx_iCmFiPiJiKpKiJlLiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	_xZkqqHx_jGlDiClF_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	98.11.16 Fukushiro M. _xZkqqHx_jFmPjAjEiCmMiPiJiKpKiJlLiCpAjCmHiJmB_xHqqkZx_.Tool_xZkqqHx_iCmFjAlGjAkMiClDiCoKiClNiOjOiCmMiInH_xHqqkZx_.
 *************************************************************************/
MC2ObjFigure::MC2ObjFigure ()
{
	/*----- _xZkqqHx_iDiBiDjDiDgPjFmPjAjEiCpAiDgGiDhEiDeIiDiLiDgHjCgMiCmJiPiJiKpKiJlL_xHqqkZx_ -----*/
	m_V1_2.m_byPenType				= FDPT_SOLID;
	m_V1_2.m_psidPenStyle			= 0;
	m_V1_2.m_mmfPenWeight			= 0.5;
	m_V1_2.m_scidPenForeSColor		= FD_S_COLOR_BLACK;
	m_V1_2.m_ptidPenPattern			= static_cast<PatternIDV12>(-1);
	m_V1_2.m_scidPenBackSColor		= FD_S_COLOR_WHITE;
	m_V1_2.m_byBrushType			= FDBT_TRANSP;
	m_V1_2.m_scidBrushForeSColor	= FD_S_COLOR_BLACK;
	m_V1_2.m_ptidBrushPattern		= static_cast<PatternIDV12>(-1);
	m_V1_2.m_scidBrushBackSColor	= FD_S_COLOR_WHITE;
	m_V1_2.m_scidShadowSColor		= static_cast<SColorID>(-1);
	m_V1_2.m_byEMFHorzMap			= FDOF_EMFMAP_HORZ_SIZE;
	m_V1_2.m_byEMFVertMap			= FDOF_EMFMAP_VERT_SIZE;
	m_V1_2.m_emidEMFImage			= FD_NO_EMFIMAGE;
	m_V1_2.m_byArrowFType			= FDUG_ARW_TYPE_FLAT;
	m_V1_2.m_byArrowFParam0		= 0;
	m_V1_2.m_byArrowFParam1		= 0;
	m_V1_2.m_byArrowFParam2		= 0;
	m_V1_2.m_byArrowBType			= FDUG_ARW_TYPE_FLAT;
	m_V1_2.m_byArrowBParam0		= 0;
	m_V1_2.m_byArrowBParam1		= 0;
	m_V1_2.m_byArrowBParam2		= 0;

	//----- _xZkqqHx_iDiBiDjDiDgPjFmPjAjEiCpAiDgGiDhEiDeIiDiLiDgHjCgMiCmJiPiJiKpKiJlL_xHqqkZx_ -----
	m_V3.m_pridPenRegister		= FD_PEN_REGISTER_UNUSE;
	m_V3.m_psidPenStyle			= 0;
	m_V3.m_mmfPenWeight			= 0.5;
	m_V3.m_scidPenBackSColor		= FD_S_COLOR_BLACK;
	m_V3.m_bridBrushRegister		= FD_BRUSH_REGISTER_UNUSE;
	m_V3.m_scidBrushForeSColor	= FD_S_COLOR_UNUSE;
	m_V3.m_ptidBrushPattern		= FD_PATTERN_UNUSE;
	m_V3.m_scidBrushBackSColor	= FD_S_COLOR_WHITE;
	m_V3.m_scidShadowSColor		= FD_S_COLOR_UNUSE;
	m_V3.m_byEMFHorzMap			= FDOF_EMFMAP_HORZ_SIZE;
	m_V3.m_byEMFVertMap			= FDOF_EMFMAP_VERT_SIZE;
	m_V3.m_emidEmfImage			= FD_EMF_IMAGE_UNUSE;
	m_V3.m_byArrowFType			= FDUG_ARW_TYPE_FLAT;
	m_V3.m_byArrowFParam0		= 0;
	m_V3.m_byArrowFParam1		= 0;
	m_V3.m_byArrowFParam2		= 0;
	m_V3.m_byArrowBType			= FDUG_ARW_TYPE_FLAT;
	m_V3.m_byArrowBParam0		= 0;
	m_V3.m_byArrowBParam1		= 0;
	m_V3.m_byArrowBParam2		= 0;

	m_pRichText = NULL;
} // MC2ObjFigure::MC2ObjFigure.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	MC2ObjFigure::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 MC2ObjFigure::OutStreamV3 (MCARCHIVE& ar)
{
	// Superclass_xZkqqHx_iKnGjAjEiBeC_xHqqkZx_
	SUPER_CLASS::OutStreamV3(ar);

	ar << m_V3.m_pridPenRegister;		// _xZkqqHx_iDhJiDjDiCmMjDgPjIfOjGlMiBeC_xHqqkZx_2Byte_xZkqqHx_iBeC_xHqqkZx_
	ar << m_V3.m_scidPenBackSColor;		// _xZkqqHx_iDhJiDjDiCmMjBePiMgJjAeGiBeC_xHqqkZx_2Byte_xZkqqHx_iBeC_xHqqkZx_
	ar << m_V3.m_mmfPenWeight;			// _xZkqqHx_iDhJiDjDiCmMjFjNiBeC_xHqqkZx_4Byte_xZkqqHx_iBeC_xHqqkZx_
	ar << m_V3.m_psidPenStyle;			// _xZkqqHx_iDhJiDjDiCmMiDfIiDfOiDeDiDiLiBeCjClMjApM_xHqqkZx_,_xZkqqHx_jDfPjApM_xHqqkZx_,etc_xZkqqHx_iBeC_xHqqkZx_2Byte_xZkqqHx_iBeC_xHqqkZx_
	ar << m_V3.m_scidShadowSColor;		// _xZkqqHx_iJgFiCmMjAeGiBeC_xHqqkZx_2Byte_xZkqqHx_iBeC_xHqqkZx_
	ar << m_V3.m_bridBrushRegister;		// _xZkqqHx_iDhFiDiJiDfGiCmMjDgPjIfOjGlMiBeC_xHqqkZx_2Byte_xZkqqHx_iBeC_xHqqkZx_
	ar << m_V3.m_scidBrushForeSColor;	// _xZkqqHx_iDhFiDiJiDfGiCmMjBePiMgJjAeGiBeC_xHqqkZx_2Byte_xZkqqHx_iBeC_xHqqkZx_
	ar << m_V3.m_scidBrushBackSColor;	// _xZkqqHx_iDhFiDiJiDfGiCmMjEhHiMgJjAeGiBeC_xHqqkZx_2Byte_xZkqqHx_iBeC_xHqqkZx_
	ar << m_V3.m_ptidBrushPattern;		// _xZkqqHx_iDhFiDiJiDfGiCmMiDhAiDfOiBfLiDjDiBeC_xHqqkZx_2Byte_xZkqqHx_iBeC_xHqqkZx_
	ar << m_V3.m_byEMFHorzMap;			// _xZkqqHx_iDiBiDfOiDhEiDeAiDeDiDiLiCmMjAiFjFlNjFpLiMpMiCmMiDhNiDgCiDhGjFpLjGeAiBeC_xHqqkZx_1Byte_xZkqqHx_iBeC_xHqqkZx_
	ar << m_V3.m_byEMFVertMap;			// _xZkqqHx_iDiBiDfOiDhEiDeAiDeDiDiLiCmMjAiCjClMjFpLiMpMiCmMiDhNiDgCiDhGjFpLjGeAiBeC_xHqqkZx_1Byte_xZkqqHx_iBeC_xHqqkZx_
	ar << m_V3.m_emidEmfImage;			// _xZkqqHx_iDiBiDfOiDhEiDeAiDeDiDiLiCmMjDgPjIfOjGlMiBeC_xHqqkZx_2Byte_xZkqqHx_iBeC_xHqqkZx_
	ar << m_V3.m_wArrowFForStream;		// _xZkqqHx_iDfIiDgHiDiKiBfLiDiAjHhAiBeC_xHqqkZx_
	ar << m_V3.m_wArrowBForStream;		// _xZkqqHx_iDfIiDgHiDiKiBfLiDiAjHhAiBeC_xHqqkZx_

	if (m_pRichText != NULL)
	// RichText_xZkqqHx_iCkKiCkAiCoJiPoKiNiHiBeC_xHqqkZx_
	{
		ar << BYTE(0x01);
		m_pRichText->OutStreamV3(ar);
	} else
	// RichText_xZkqqHx_iCkKjGlDiCkCiPoKiNiHiBeC_xHqqkZx_
	{
		ar << BYTE(0x00);
	}
} // MC2ObjFigure::OutStreamV3.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	MC2ObjFigure::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 MC2ObjFigure::InStreamV12 (MCARCHIVE& ar)
{
	// Superclass_xZkqqHx_iKnGjAjEiBeC_xHqqkZx_
	SUPER_CLASS::InStreamV12(ar);

	ar >> m_V1_2.m_psidPenStyle;			// _xZkqqHx_iDhJiDjDiCmMiDfIiDfOiDeDiDiLiBeCjClMjApM_xHqqkZx_,_xZkqqHx_jDfPjApM_xHqqkZx_,etc_xZkqqHx_iBeC_xHqqkZx_
	ar >> m_V1_2.m_byPenPatternForStream;	// _xZkqqHx_iDhJiDjDiCmMiDhAiDfOiBfLiDjDiBeC_xHqqkZx_
	ar >> m_V1_2.m_byBrushPatternForStream;	// _xZkqqHx_iDhFiDiJiDfGiCmMiDhAiDfOiBfLiDjDiBeC_xHqqkZx_
	ar >> m_V1_2.m_byTypeForStream;			// _xZkqqHx_iDhJiDjDiBeFiDhFiDiJiDfGiCmMiMfOiBeC_xHqqkZx_
	ar >> m_V1_2.m_mmfPenWeight;			// _xZkqqHx_iDhJiDjDiCmMjFjNiBeC_xHqqkZx_
	ar >> m_V1_2.m_scidPenForeSColor;		// _xZkqqHx_iDhJiDjDiCmMjBePiMgJjAeGiBeC_xHqqkZx_
	ar >> m_V1_2.m_wPenColorForStream;		// _xZkqqHx_iDhJiDjDiCmMjEhHiMgJjAeGiBeC_xHqqkZx_
	ar >> m_V1_2.m_wBrsForeColForStream;	// _xZkqqHx_iDhFiDiJiDfGiCmMjBePiMgJjAeGiBeC_xHqqkZx_
	ar >> m_V1_2.m_wBrsBackColForStream;	// _xZkqqHx_iDhFiDiJiDfGiCmMjEhHiMgJjAeGiBeC_xHqqkZx_
	ar >> m_V1_2.m_scidShadowSColor;		// _xZkqqHx_iJgFiCmMjAeGiBeC_xHqqkZx_
	ar >> m_V1_2.m_wEMFInfoForStream;		// _xZkqqHx_iDiBiDfOiDhEiDeAiDeDiDiLiPoOjFpBiBeC_xHqqkZx_
	ar >> m_V1_2.m_wArrowFForStream;		// _xZkqqHx_iKeKiOgOjGoOiIpDiPoOjFpBiBeC_xHqqkZx_
	ar >> m_V1_2.m_wArrowBForStream;		// _xZkqqHx_iPeJjHlJjGoOiIpDiPoOjFpBiBeC_xHqqkZx_

	BYTE byIsRTF;
	ar >> byIsRTF;
	if (byIsRTF)
	// RichText_xZkqqHx_iCkKiCkAiCoJiPoKiNiHiBeC_xHqqkZx_
	{
		if (m_pRichText == NULL)
			m_pRichText = new MC2RichText();
			m_pRichText->InStreamV2(ar);
	} else
	// RichText_xZkqqHx_iCkKjGlDiCkCiPoKiNiHiBeC_xHqqkZx_
	{
		if (m_pRichText != NULL)
		{
			delete m_pRichText;
			m_pRichText = NULL;
		}
	}
} // MC2ObjFigure::InStreamV12.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	MC2ObjFigure::TerminateInStream
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	InStreamV12_xZkqqHx_iCmMiPeJjHlJiPiIjHjNiCpAiNhDiCkEiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	01.03.21 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void MC2ObjFigure::TerminateInStream ()
{
	// Superclass_xZkqqHx_iKnGjAjEiBeC_xHqqkZx_
	SUPER_CLASS::TerminateInStream();

	if (m_V1_2.m_byPenType == FDPT_REGIST)
	//----- _xZkqqHx_jDgPjIfOiDhJiDjDiCmMiPoKiNiH_xHqqkZx_ -----
	{
		m_V3.m_pridPenRegister = m_V1_2.m_scidPenBackSColor;	// _xZkqqHx_iDhJiDjDiCmMjDgPjIfOjGlMiBeC_xHqqkZx_2Byte_xZkqqHx_iBeC_xHqqkZx_
		m_V3.m_scidPenBackSColor = FD_S_COLOR_UNUSE;		// _xZkqqHx_iDhJiDjDiCmMjBePiMgJjAeGiBeC_xHqqkZx_2Byte_xZkqqHx_iBeC_xHqqkZx_
		m_V3.m_mmfPenWeight = FD_PEN_WEIGHT_UNUSE;			// _xZkqqHx_iDhJiDjDiCmMjFjNiBeC_xHqqkZx_4Byte_xZkqqHx_iBeC_xHqqkZx_
		m_V3.m_psidPenStyle = FD_PEN_STYLE_UNUSE;			// _xZkqqHx_iDhJiDjDiCmMiDfIiDfOiDeDiDiLiBeCjClMjApM_xHqqkZx_,_xZkqqHx_jDfPjApM_xHqqkZx_,etc_xZkqqHx_iBeC_xHqqkZx_2Byte_xZkqqHx_iBeC_xHqqkZx_
	} else
	if (m_V1_2.m_byPenType == FDPT_TRANSP)
	//----- _xZkqqHx_jDkHjGlOiDhJiDjDiCmMiPoKiNiH_xHqqkZx_ -----
	{
		m_V3.m_pridPenRegister = FD_PEN_REGISTER_UNUSE;			// _xZkqqHx_iDhJiDjDiCmMjDgPjIfOjGlMiBeC_xHqqkZx_2Byte_xZkqqHx_iBeC_xHqqkZx_
		m_V3.m_scidPenBackSColor = FD_S_COLOR_TRANSPARENT;
		m_V3.m_mmfPenWeight = 0.0;
		m_V3.m_psidPenStyle = FD_PEN_STYLE_UNUSE;
	} else
	//----- _xZkqqHx_jDgPjIfOiDhJiDjDiBeBjDkHjGlOiDhJiDjDiImIiKePiCmMiPoKiNiH_xHqqkZx_ -----
	{
		m_V3.m_pridPenRegister = FD_PEN_REGISTER_UNUSE;			// _xZkqqHx_iDhJiDjDiCmMjDgPjIfOjGlMiBeC_xHqqkZx_2Byte_xZkqqHx_iBeC_xHqqkZx_
		m_V3.m_scidPenBackSColor = m_V1_2.m_scidPenForeSColor;	// _xZkqqHx_iDhJiDjDiCmMiMoDiMgJjAeGiBeC_xHqqkZx_2Byte_xZkqqHx_iBeC_xHqqkZx_
		m_V3.m_mmfPenWeight = m_V1_2.m_mmfPenWeight;				// _xZkqqHx_iDhJiDjDiCmMjFjNiBeC_xHqqkZx_4Byte_xZkqqHx_iBeC_xHqqkZx_
		m_V3.m_psidPenStyle = m_V1_2.m_psidPenStyle;				// _xZkqqHx_iDhJiDjDiCmMiDfIiDfOiDeDiDiLiBeCjClMjApM_xHqqkZx_,_xZkqqHx_jDfPjApM_xHqqkZx_,etc_xZkqqHx_iBeC_xHqqkZx_2Byte_xZkqqHx_iBeC_xHqqkZx_
	}

	if (m_V1_2.m_byBrushType == FDBT_REGIST)
	//----- _xZkqqHx_jDgPjIfOiDhFiDiJiDfGiCmMiPoKiNiH_xHqqkZx_ -----
	{
		m_V3.m_bridBrushRegister = m_V1_2.m_scidBrushBackSColor;	// _xZkqqHx_iDhFiDiJiDfGiCmMjDgPjIfOjGlMiBeC_xHqqkZx_2Byte_xZkqqHx_iBeC_xHqqkZx_
		m_V3.m_scidBrushForeSColor = FD_S_COLOR_UNUSE;			// _xZkqqHx_iDhFiDiJiDfGiCmMjBePiMgJjAeGiBeC_xHqqkZx_2Byte_xZkqqHx_iBeC_xHqqkZx_
		m_V3.m_scidBrushBackSColor = FD_S_COLOR_UNUSE;			// _xZkqqHx_iDhFiDiJiDfGiCmMjEhHiMgJjAeGiBeC_xHqqkZx_2Byte_xZkqqHx_iBeC_xHqqkZx_
		m_V3.m_ptidBrushPattern = FD_PATTERN_UNUSE;				// _xZkqqHx_iDhFiDiJiDfGiCmMiDhAiDfOiBfLiDjDiBeC_xHqqkZx_2Byte_xZkqqHx_iBeC_xHqqkZx_
	} else
	if (m_V1_2.m_byBrushType == FDBT_TRANSP)
	//----- _xZkqqHx_jDkHjGlOiDhFiDiJiDfGiCmMiPoKiNiH_xHqqkZx_ -----
	{
		m_V3.m_bridBrushRegister = FD_BRUSH_REGISTER_UNUSE;		// _xZkqqHx_iDhFiDiJiDfGiCmMjDgPjIfOjGlMiBeC_xHqqkZx_2Byte_xZkqqHx_iBeC_xHqqkZx_
		m_V3.m_scidBrushForeSColor = FD_S_COLOR_UNUSE;			// _xZkqqHx_iDhFiDiJiDfGiCmMjBePiMgJjAeGiBeC_xHqqkZx_2Byte_xZkqqHx_iBeC_xHqqkZx_
		m_V3.m_scidBrushBackSColor = FD_S_COLOR_UNUSE;			// _xZkqqHx_iDhFiDiJiDfGiCmMjEhHiMgJjAeGiBeC_xHqqkZx_2Byte_xZkqqHx_iBeC_xHqqkZx_
		m_V3.m_ptidBrushPattern = FD_PATTERN_UNUSE;				// _xZkqqHx_iDhFiDiJiDfGiCmMiDhAiDfOiBfLiDjDiBeC_xHqqkZx_2Byte_xZkqqHx_iBeC_xHqqkZx_
	} else
	if (m_V1_2.m_byBrushType == FDBT_PATTERN)
	//----- _xZkqqHx_iDhAiDfOiBfLiDjDiDhFiDiJiDfGiCmMiPoKiNiH_xHqqkZx_ -----
	{
		// _xZkqqHx_iDhAiDfOiBfLiDjDiCmMiPoKiNiHiCmNiBeBjBePiMgJjAeGiBeFjEhHiMgJjAeGiCmMjDpMjBnGiCkGiCmNjGlDiClFiBeC_xHqqkZx_
		m_V3.m_bridBrushRegister = FD_BRUSH_REGISTER_UNUSE;			// _xZkqqHx_iDhFiDiJiDfGiCmMjDgPjIfOjGlMiBeC_xHqqkZx_2Byte_xZkqqHx_iBeC_xHqqkZx_
		m_V3.m_scidBrushForeSColor = m_V1_2.m_scidBrushForeSColor;	// _xZkqqHx_iDhFiDiJiDfGiCmMjBePiMgJjAeGiBeC_xHqqkZx_2Byte_xZkqqHx_iBeC_xHqqkZx_
		m_V3.m_scidBrushBackSColor = m_V1_2.m_scidBrushBackSColor;	// _xZkqqHx_iDhFiDiJiDfGiCmMjEhHiMgJjAeGiBeC_xHqqkZx_2Byte_xZkqqHx_iBeC_xHqqkZx_
		switch (m_V1_2.m_ptidBrushPattern)
		{
		case 0:		// "_xZkqqHx_jDfP_xHqqkZx_94%"
		case 1:		// "_xZkqqHx_jDfP_xHqqkZx_88%"
			m_V3.m_ptidBrushPattern = 0;	// "_xZkqqHx_jDfP_xHqqkZx_99%"
			break;
		case 2:		// "_xZkqqHx_jDfP_xHqqkZx_81%"
		case 3:		// "_xZkqqHx_jDfP_xHqqkZx_75%"
			m_V3.m_ptidBrushPattern = 1;	// "_xZkqqHx_jDfP_xHqqkZx_96%"
			break;
		case 4:		// "_xZkqqHx_jDfP_xHqqkZx_69%"
		case 5:		// "_xZkqqHx_jDfP_xHqqkZx_63%"
			m_V3.m_ptidBrushPattern = 2;	// "_xZkqqHx_jDfP_xHqqkZx_82%"
			break;
		case 6:		// "_xZkqqHx_jDfP_xHqqkZx_56%"
		case 7:		// "_xZkqqHx_jDfP_xHqqkZx_50%"
			m_V3.m_ptidBrushPattern = 3;	// "_xZkqqHx_jDfP_xHqqkZx_50%"
			break;
		case 8:		// "_xZkqqHx_jDfP_xHqqkZx_44%"
		case 9:		// "_xZkqqHx_jDfP_xHqqkZx_38%"
			m_V3.m_ptidBrushPattern = 4;	// "_xZkqqHx_jDfP_xHqqkZx_22%"
			break;
		case 10:		// "_xZkqqHx_jDfP_xHqqkZx_31%"
		case 11:		// "_xZkqqHx_jDfP_xHqqkZx_25%"
			m_V3.m_ptidBrushPattern = 5;	// "_xZkqqHx_jDfP_xHqqkZx_7%"
			break;
		case 12:		// "_xZkqqHx_jDfP_xHqqkZx_19%"
		case 13:		// "_xZkqqHx_jDfP_xHqqkZx_13%"
		case 14:		// "_xZkqqHx_jDfP_xHqqkZx_6%"
			m_V3.m_ptidBrushPattern = 6;	// "_xZkqqHx_jDfP_xHqqkZx_3%"
			break;
		case 15:		// "_xZkqqHx_jBgFiPgDjApM_xHqqkZx_"
			m_V3.m_ptidBrushPattern = 8;	// "_xZkqqHx_jFmAiNnHiPgDjApM_xHqqkZx_"
			break;
		case 16:		// "_xZkqqHx_jGkHiPgDjApM_xHqqkZx_"
			m_V3.m_ptidBrushPattern = 9;	// "_xZkqqHx_jGkHiNnHiPgDjApM_xHqqkZx_"
			break;
		case 17:		// "_xZkqqHx_jBgFiJkBjApM_xHqqkZx_"
			m_V3.m_ptidBrushPattern = 14;	// "_xZkqqHx_jFmAiNnHiJkBjApM_xHqqkZx_"
			break;
		case 18:		// "_xZkqqHx_jGkHiJkBjApM_xHqqkZx_"
			m_V3.m_ptidBrushPattern = 15;	// "_xZkqqHx_jGkHiNnHiJkBjApM_xHqqkZx_"
			break;
		case 19:		// "_xZkqqHx_jBgFiJeFiOmOjApM_xHqqkZx_"
			m_V3.m_ptidBrushPattern = 20;	// "_xZkqqHx_jFmAiNnHiJeFiOmOjApM_xHqqkZx_"
			break;
		case 20:		// "_xZkqqHx_jGkHiJeFiOmOjApM_xHqqkZx_"
			m_V3.m_ptidBrushPattern = 21;	// "_xZkqqHx_jGkHiNnHiJeFiOmOjApM_xHqqkZx_"
			break;
		case 21:		// "_xZkqqHx_jBgFiNlGiOmOjApM_xHqqkZx_"
			m_V3.m_ptidBrushPattern = 26;	// "_xZkqqHx_jFmAiNnHiNlGiOmOjApM_xHqqkZx_"
			break;
		case 22:		// "_xZkqqHx_jGkHiNlGiOmOjApM_xHqqkZx_"
			m_V3.m_ptidBrushPattern = 27;	// "_xZkqqHx_jGkHiNnHiNlGiOmOjApM_xHqqkZx_"
			break;
		case 23:		// "_xZkqqHx_jBgFiKgJiOhB_xHqqkZx_"
			m_V3.m_ptidBrushPattern = 32;	// "_xZkqqHx_jFmAiNnHiKgJiOhB_xHqqkZx_"
			break;
		case 24:		// "_xZkqqHx_jGkHiKgJiOhB_xHqqkZx_"
			m_V3.m_ptidBrushPattern = 33;	// "_xZkqqHx_jGkHiNnHiKgJiOhB_xHqqkZx_"
			break;
		case 25:		// "_xZkqqHx_iOmOiKgJiOhB_xHqqkZx_"
			m_V3.m_ptidBrushPattern = 39;	// "_xZkqqHx_jGkHiNnHiOmOiKgJiOhB_xHqqkZx_"
			break;
		case 26:		// "_xZkqqHx_jBgFiJkBjEgH_xHqqkZx_"
			m_V3.m_ptidBrushPattern = 44;	// "_xZkqqHx_jFmAiNnHiJkBjEgH_xHqqkZx_"
			break;
		case 27:		// "_xZkqqHx_jGkHiJkBjEgH_xHqqkZx_"
			m_V3.m_ptidBrushPattern = 45;	// "_xZkqqHx_jGkHiNnHiJkBjEgH_xHqqkZx_"
			break;
		case 28:		// "_xZkqqHx_jBgFiPgDjEgH_xHqqkZx_"
			m_V3.m_ptidBrushPattern = 50;	// "_xZkqqHx_jFmAiNnHiPgDjEgH_xHqqkZx_"
			break;
		case 29:		// "_xZkqqHx_jGkHiPgDjEgH_xHqqkZx_"
			m_V3.m_ptidBrushPattern = 51;	// "_xZkqqHx_jGkHiNnHiPgDjEgH_xHqqkZx_"
			break;
		case 30:		// "_xZkqqHx_jBgFiJeFiOmOjEgH_xHqqkZx_"
			m_V3.m_ptidBrushPattern = 47;	// "_xZkqqHx_jFmAjBlOiJkBjEgH_xHqqkZx_"
			break;
		case 31:		// "_xZkqqHx_jGkHiJeFiOmOjEgH_xHqqkZx_"
			m_V3.m_ptidBrushPattern = 48;	// "_xZkqqHx_jGkHjBlOiJkBjEgH_xHqqkZx_"
			break;
		case 32:		// "_xZkqqHx_jBgFiNlGiOmOjEgH_xHqqkZx_"
			m_V3.m_ptidBrushPattern = 53;	// "_xZkqqHx_jFmAjBlOiPgDjEgH_xHqqkZx_"
			break;
		case 33:		// "_xZkqqHx_jGkHiNlGiOmOjEgH_xHqqkZx_"
			m_V3.m_ptidBrushPattern = 54;	// "_xZkqqHx_jGkHjBlOiPgDjEgH_xHqqkZx_"
			break;
		}
	} else
	//----- _xZkqqHx_jDgPjIfOiBeBjDkHjGlOiBeBiDhAiDfOiBfLiDjDiDhFiDiJiDfGiImIiKePiCmMiPoKiNiH_xHqqkZx_ -----
	{
		// _xZkqqHx_jEhHiMgJjAeGiCmNiLiMjBePiMgJjAeGiBeC_xHqqkZx_
		m_V3.m_bridBrushRegister = FD_BRUSH_REGISTER_UNUSE;			// _xZkqqHx_iDhFiDiJiDfGiCmMjDgPjIfOjGlMiBeC_xHqqkZx_2Byte_xZkqqHx_iBeC_xHqqkZx_
		m_V3.m_scidBrushForeSColor = FD_S_COLOR_UNUSE;				// _xZkqqHx_iDhFiDiJiDfGiCmMjBePiMgJjAeGiBeC_xHqqkZx_2Byte_xZkqqHx_iBeC_xHqqkZx_
		m_V3.m_scidBrushBackSColor = m_V1_2.m_scidBrushForeSColor;	// _xZkqqHx_iDhFiDiJiDfGiCmMjEhHiMgJjAeGiBeC_xHqqkZx_2Byte_xZkqqHx_iBeC_xHqqkZx_
		m_V3.m_ptidBrushPattern = FD_PATTERN_UNUSE;					// _xZkqqHx_iDhFiDiJiDfGiCmMiDhAiDfOiBfLiDjDiBeC_xHqqkZx_2Byte_xZkqqHx_iBeC_xHqqkZx_
	}
	if (m_V1_2.m_scidShadowSColor == SColorID(-1))
		m_V3.m_scidShadowSColor = FD_S_COLOR_UNUSE;
	else
		m_V3.m_scidShadowSColor = m_V1_2.m_scidShadowSColor;		// _xZkqqHx_iJgFiCmMjAeGiBeC_xHqqkZx_2Byte_xZkqqHx_iBeC_xHqqkZx_

	m_V3.m_byEMFHorzMap = m_V1_2.m_byEMFHorzMap;				// _xZkqqHx_iDiBiDfOiDhEiDeAiDeDiDiLiCmMjAiFjFlNjFpLiMpMiCmMiDhNiDgCiDhGjFpLjGeAiBeC_xHqqkZx_1Byte_xZkqqHx_iBeC_xHqqkZx_
	m_V3.m_byEMFVertMap = m_V1_2.m_byEMFVertMap;				// _xZkqqHx_iDiBiDfOiDhEiDeAiDeDiDiLiCmMjAiCjClMjFpLiMpMiCmMiDhNiDgCiDhGjFpLjGeAiBeC_xHqqkZx_1Byte_xZkqqHx_iBeC_xHqqkZx_
	if (m_V1_2.m_emidEMFImage == FD_NO_EMFIMAGE)
		m_V3.m_emidEmfImage = FD_EMF_IMAGE_UNUSE;
	else
		m_V3.m_emidEmfImage = m_V1_2.m_emidEMFImage;				// _xZkqqHx_iDiBiDfOiDhEiDeAiDeDiDiLiCmMjDgPjIfOjGlMiBeC_xHqqkZx_2Byte_xZkqqHx_iBeC_xHqqkZx_

	m_V3.m_wArrowFForStream = m_V1_2.m_wArrowFForStream;		// _xZkqqHx_iDfIiDgHiDiKiBfLiDiAjHhAiBeC_xHqqkZx_
	m_V3.m_wArrowBForStream = m_V1_2.m_wArrowBForStream;		// _xZkqqHx_iDfIiDgHiDiKiBfLiDiAjHhAiBeC_xHqqkZx_

	if (m_V3.m_pridPenRegister == PenRegisterID(-1))
		m_V3.m_pridPenRegister = PenRegisterID(-2);
	if (m_V3.m_scidPenBackSColor == SColorID(-1))
		m_V3.m_scidPenBackSColor = SColorID(-2);
	if (m_V3.m_psidPenStyle == PenStyleID(-1))
		m_V3.m_psidPenStyle = PenStyleID(-2);
	if (m_V3.m_scidShadowSColor == SColorID(-1))
		m_V3.m_scidShadowSColor = SColorID(-2);
	if (m_V3.m_bridBrushRegister == BrushRegisterID(-1))
		m_V3.m_bridBrushRegister = BrushRegisterID(-2);
	if (m_V3.m_scidBrushForeSColor == SColorID(-1))
		m_V3.m_scidBrushForeSColor = SColorID(-2);
	if (m_V3.m_scidBrushBackSColor == SColorID(-1))
		m_V3.m_scidBrushBackSColor = SColorID(-2);
	if (m_V3.m_ptidBrushPattern == PatternID(-1))
		m_V3.m_ptidBrushPattern = PatternID(-2);
	if (m_V3.m_emidEmfImage == EmfImageID(-1))
		m_V3.m_emidEmfImage = EmfImageID(-2);

	// _xZkqqHx_iKeKiCkCiClNiDhMiDiKiDfDiDjDiCmMiPoKiNiHiCmNiBeBiDhFiDiJiDfGiCoCjEhHiMgJiJoGiCpAjGlDiCkNiClHiBeC_xHqqkZx_
	if (!IsClosePolygon())
	//----- _xZkqqHx_iKeKiCkCiClNiMgAiCmMiPoKiNiH_xHqqkZx_ -----
	{
		//----- V3_xZkqqHx_iCmMiDhFiDiJiDfGiCpAjDkHjGlOiCmJiClHiCoJ_xHqqkZx_ -----
		m_V3.m_bridBrushRegister = FD_BRUSH_REGISTER_UNUSE;		// _xZkqqHx_iDhFiDiJiDfGiCmMjDgPjIfOjGlMiBeC_xHqqkZx_2Byte_xZkqqHx_iBeC_xHqqkZx_
		m_V3.m_scidBrushForeSColor = FD_S_COLOR_UNUSE;			// _xZkqqHx_iDhFiDiJiDfGiCmMjBePiMgJjAeGiBeC_xHqqkZx_2Byte_xZkqqHx_iBeC_xHqqkZx_
		m_V3.m_scidBrushBackSColor = FD_S_COLOR_UNUSE;			// _xZkqqHx_iDhFiDiJiDfGiCmMjEhHiMgJjAeGiBeC_xHqqkZx_2Byte_xZkqqHx_iBeC_xHqqkZx_
		m_V3.m_ptidBrushPattern = FD_PATTERN_UNUSE;				// _xZkqqHx_iDhFiDiJiDfGiCmMiDhAiDfOiBfLiDjDiBeC_xHqqkZx_2Byte_xZkqqHx_iBeC_xHqqkZx_


		//----- V3_xZkqqHx_iCmMjEhHiMgJiJoGiCpAiCmIiClFiCmJiClHiCoJ_xHqqkZx_ -----
		m_V3.m_emidEmfImage = FD_EMF_IMAGE_UNUSE;

		//----- V1,V2,V3_xZkqqHx_iCmMiDgFiDeMiDfIiDgHiCpAiNoNiPjMiClHiCoJ_xHqqkZx_ -----
		if (m_pRichText != NULL)
		{
			delete m_pRichText;
			m_pRichText = NULL;
		}
	}
} // MC2ObjFigure::TerminateInStream.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	MC2ObjFigure::~MC2ObjFigure
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDgGiDfIiDgHiDiJiDeOiDfO_xHqqkZx_
 *************************************************************************/
MC2ObjFigure::~MC2ObjFigure ()
{
	if (m_pRichText != NULL)
	{
		delete m_pRichText;
		m_pRichText = NULL;
	}
} // MC2ObjFigure::~MC2ObjFigure.

MC2RichText* MC2ObjFigure::GetRichText () const
{
	return m_pRichText;
} // MC2ObjFigure::GetRichText.

void MC2ObjFigure::SetRichText (MC2RichText* pText)
{
	m_pRichText = pText;
} // MC2ObjFigure::SetRichText.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	MC2ObjFigure::IsClosePolygon
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	NewObjPolygon_xZkqqHx_iCkKjFnEiClHiDhMiDiKiDfDiDjDiCkKjFmCiClGiCmEiCkCiCoJiCkJiCmHiCkEiCkJiCpAjFnEiClHiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jFnEjCgM_xHqqkZx_>	_xZkqqHx_jFmCiClGiCmEiCkCiCoJiPoKiNiHiCmN_xHqqkZx_TRUE_xZkqqHx_iBeC_xHqqkZx_
 *
 * <_xZkqqHx_iPnKiNnH_xHqqkZx_>	NewObjPolygon _xZkqqHx_iCmNiBeB_xHqqkZx_ObjFigure_xZkqqHx_iCmMiDfEiDhFiDeOiDiJiDfIiCmJjFeLjAhLiCmMiKnGjAjEiBeC_xHqqkZx_
 *			_xZkqqHx_iClBiClBiCmFiCnMiCmGiCnPiCmEiBeB_xHqqkZx_TRUE_xZkqqHx_iCpAjFnEiClHiBeC_xHqqkZx_ObjArc/ObjPoly_xZkqqHx_jDjJiCmFiBeBiMmCjFmKiCmJ_xHqqkZx_
 *			_xZkqqHx_jFnEiClHjCgMiCmMjFmPiNfIiCkKjFeLjHhGiBeC_xHqqkZx_GetIsOpenPolyJoint_xZkqqHx_iKnGjAjEiCmGiCmNiInJiCmIiCoJiClBiCmGiCmJjCiNiInDiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	01.11.28 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
BOOL MC2ObjFigure::IsClosePolygon () const
{
	return TRUE;
} // MC2ObjFigure::IsClosePolygon.
