Files
gjm 164968b62e chore
把非utf8-bom编码的cpp/h文件改为 utf8 bom 编码, msvc识别utf8编码时,如果不是bom格式的,会使用当前cp_oem来解码.
2026-10-04 00:04:20 +08:00

64 lines
1.5 KiB
C++

//-----------------------------------------------------------------------------+
// Copyright (C), 1998-2007, SH Software Co. Ltd.
// = FileName : XArchMatchProp.cpp
// = Version : ver2.0
// = Author : zjq
// = CreateDate : 2002-09-09
// = Description: 匹配属性类的定义
// = Maintainers:
//
//-----------------------------------------------------------------------------+
#include "StdAfx.h"
#include "XArchMatchProp.h"
#include "AecEntity.h"
#include "AecCurveEntity.h"
XArchMatchProp::~XArchMatchProp()
{
}
// 提供对格式刷的支持
void XArchMatchProp::copyProperties(AcDbEntity* pSrcEntity,
AcDbEntity* pTrgEntity,
unsigned int gMatchFlag) const
{
if (pTrgEntity->isKindOf(AecEntity::desc()))
{
((AecEntity *)pTrgEntity)->CopyPropertiesFrom(pSrcEntity, gMatchFlag);
}
else if (pTrgEntity->isKindOf(AecCurveEntity::desc()))
{
((AecEntity *)pTrgEntity)->CopyPropertiesFrom(pSrcEntity, gMatchFlag);
}
else
{
// 颜色
if (gMatchFlag & kColorFlag)
{
pTrgEntity->setColorIndex(pSrcEntity->colorIndex());
}
// 图层
if (gMatchFlag & kLayerFlag)
{
pTrgEntity->setLayer(pSrcEntity->layerId());
}
// 线型
if (gMatchFlag & kLtypeFlag)
{
pTrgEntity->setLinetype(pSrcEntity->linetypeId());
}
// 线型比例
if (gMatchFlag & kLtscaleFlag)
{
pTrgEntity->setLinetypeScale(pSrcEntity->linetypeScale());
}
// 可见性
pTrgEntity->setVisibility(pSrcEntity->visibility());
}
}