Files
envi-code/SourceCode/Code2026/AdsXRx/PushProperty.cpp
T
2026-09-28 15:28:50 +08:00

48 lines
997 B
C++

//-----------------------------------------------------------------------------+
// Copyright (C), 1998-2007, SH Software Co. Ltd.
// = FileName : PushProperty.cpp
// = Version : ver2.0
// = Author : zjq
// = CreateDate : 2002-09-09
// = Description: ÊôÐÔÀàµÄ¶¨Òå
// = Maintainers:
//
//-----------------------------------------------------------------------------+
#include "StdAfx.h"
#include "PushProperty.h"
#include "XAcGiViewDraw.h"
#include "XMasterProperties.h"
PushProperty::PushProperty(const AcDbEntity *ent, XExplodeDraw &dc)
{
ASSERT(ent);
dc.BackUpProperties(m_prop);
m_pDC = &dc;
XMasterProperties prop;
if (_tcsicmp(dc.Desc(), XAcGiViewDraw::Descriptor()) == 0)
{
prop.SetFromEx(ent);
}
else
{
prop.SetFrom(ent);
}
dc.RestoreProperties(prop);
}
PushProperty::PushProperty(XExplodeDraw &dc)
{
dc.BackUpProperties(m_prop);
m_pDC = &dc;
}
PushProperty::~PushProperty()
{
if (m_pDC)
{
m_pDC->RestoreProperties(m_prop);
}
}