TA的每日心情 | 开心 7 小时前 |
---|
签到天数: 20 天 [LV.4]偶尔看看III
管理员
- 积分
- 1393
|
- void test采用setBackgroundFill采用MText()
- {
- ads采用name ename;
- ads采用point p;
- // select the entity
- int res = acedEntSel(采用T("Please pick an MText entity: "), ename, p );
- // if ok
- if (res == RTNORM)
- {
- AcDbObjectId oId;
- acdbGetObjectId( oId, ename );
- AcDbObjectPointer<AcDbMText> pMText(oId, AcDb::kForWrite);
-
- if(pMText.openStatus() == Acad::eOk)
- {
- AcCmColor color;
- if(pMText->backgroundFillOn())
- {
- pMText->setUseBackgroundColor(false);
- pMText->setBackgroundFill(false);
- }
- else
- {
- pMText->setBackgroundFill(true);
- color.setColorIndex(1);
- pMText->setBackgroundFillColor(color);
- pMText->setUseBackgroundColor(false);
- }
- }
- else
- acutPrintf(采用T("\nError - you need to select an MText entity..."));
- }
- }
复制代码 |
|