47 lines
1.0 KiB
C++
47 lines
1.0 KiB
C++
//-----------------------------------------------------------------------------+
|
|
// Copyright (C), 1998-2007, Beijing Tangent Software Co. Ltd.
|
|
// = FileName : TPushProperty.cpp
|
|
// = Version : ver2.0
|
|
// = Author : xlc
|
|
// = CreateDate : 2002-09-09
|
|
// = Description: ÊôÐÔÀàµÄ¶¨Òå
|
|
// = Maintainers:
|
|
//
|
|
//-----------------------------------------------------------------------------+
|
|
#include "StdAfx.h"
|
|
#include "TPushProperty.h"
|
|
#include "TGGiWorldViewportDraw.h"
|
|
#include "TMasterProperties.h"
|
|
|
|
TPushProperty::TPushProperty(const AcDbEntity *ent, TGGiExplodeDrawBase &dc)
|
|
{
|
|
ASSERT(ent);
|
|
dc.BackUpProperties(m_prop);
|
|
m_pDC = &dc;
|
|
|
|
TMasterProperties prop;
|
|
if (_tcsicmp(dc.Desc(), TGGiWorldViewportDraw::Descriptor()) == 0)
|
|
{
|
|
prop.SetFromEx(ent);
|
|
}
|
|
else
|
|
{
|
|
prop.SetFrom(ent);
|
|
}
|
|
|
|
dc.RestoreProperties(prop);
|
|
}
|
|
|
|
TPushProperty::TPushProperty(TGGiExplodeDrawBase &dc)
|
|
{
|
|
dc.BackUpProperties(m_prop);
|
|
m_pDC = &dc;
|
|
}
|
|
|
|
TPushProperty::~TPushProperty()
|
|
{
|
|
if (m_pDC)
|
|
{
|
|
m_pDC->RestoreProperties(m_prop);
|
|
}
|
|
} |