2026-10-04 00:04:20 +08:00
|
|
|
//-----------------------------------------------------------------------------+
|
2026-09-28 15:28:50 +08:00
|
|
|
// Copyright (C), 1998-2007, Beijing Tangent Software Co. Ltd.
|
|
|
|
|
// = FileName : TPushProperty.cpp
|
|
|
|
|
// = Version : ver2.0
|
|
|
|
|
// = Author : xlc
|
|
|
|
|
// = CreateDate : 2002-09-09
|
2026-10-04 00:04:20 +08:00
|
|
|
// = Description: 属性类的定义
|
2026-09-28 15:28:50 +08:00
|
|
|
// = 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);
|
|
|
|
|
}
|
|
|
|
|
}
|