AcGiGeometry::text 自画实体输出文字实例

来源:互联网 发布:死亡诗社知乎 编辑:程序博客网 时间:2024/05/21 14:02
软件架构师何志丹
void XXX::XX(AcGiWorldDraw* mode,const BJJCad::CDoublePoint& pt1,const BJJCad::CDoublePoint& pt2)
//...

AcGePoint3d pos(0.0, 0.0, 0.0);
    AcGeVector3d norm(0.0, 0.0, 1.0);
    AcGeVector3d dir(1.0, 0.2, 0.0);
    TCHAR *pStr = _T("Test string");
    int len = _tcslen(pStr);
 
 AcGiTextStyle AsdkStyle;

    mode->geometry().text(pos, norm, dir, pStr, len,
        Adesk::kFalse, AsdkStyle);

 mode->geometry().text(pos, norm, dir,10,-1,0,_T("12ABD"));

//
AcGeVector3d norm(0.0, 0.0, 1.0); 表示文字垂直于Z轴
dir 表示文字方向
10表示 文字高度
-1 表示宽带