重构pcfiso
This commit is contained in:
1 parent
c4569ecac3
commit
59dcfe9e25
1 file changed
+4
-2
@@ -375,7 +375,8 @@ namespace
|
|||||||
{
|
{
|
||||||
if (!txt || !*txt) return AcDbObjectId::kNull;
|
if (!txt || !*txt) return AcDbObjectId::kNull;
|
||||||
const AcGePoint2d q = apply(p);
|
const AcGePoint2d q = apply(p);
|
||||||
AcDbText *pEnt = new AcDbText(AcGePoint3d(q.x, q.y, 0.0), txt, AcDbObjectId::kNull, h, 0.0);
|
const double hh = h * m_scale; // 文字高度也要随缩放变换(与 addCircle 的 r*m_scale 一致)
|
||||||
|
AcDbText *pEnt = new AcDbText(AcGePoint3d(q.x, q.y, 0.0), txt, AcDbObjectId::kNull, hh, 0.0);
|
||||||
return append(pEnt, layer);
|
return append(pEnt, layer);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -384,7 +385,8 @@ namespace
|
|||||||
{
|
{
|
||||||
if (!txt || !*txt) return AcDbObjectId::kNull;
|
if (!txt || !*txt) return AcDbObjectId::kNull;
|
||||||
const AcGePoint2d q = apply(p);
|
const AcGePoint2d q = apply(p);
|
||||||
AcDbText *pEnt = new AcDbText(AcGePoint3d(q.x, q.y, 0.0), txt, AcDbObjectId::kNull, h, rot);
|
const double hh = h * m_scale; // 文字高度也要随缩放变换
|
||||||
|
AcDbText *pEnt = new AcDbText(AcGePoint3d(q.x, q.y, 0.0), txt, AcDbObjectId::kNull, hh, rot);
|
||||||
if (hMode == 1) pEnt->setHorizontalMode(AcDb::kTextCenter);
|
if (hMode == 1) pEnt->setHorizontalMode(AcDb::kTextCenter);
|
||||||
else if (hMode == 2) pEnt->setHorizontalMode(AcDb::kTextRight);
|
else if (hMode == 2) pEnt->setHorizontalMode(AcDb::kTextRight);
|
||||||
pEnt->setVerticalMode(AcDb::kTextVertMid);
|
pEnt->setVerticalMode(AcDb::kTextVertMid);
|
||||||
|
|||||||
Reference in new issue
Block a user