几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量

几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 (http://www.dimcax.com/hust/index.php)
-   ObjectARX(VB.NET/C#) (http://www.dimcax.com/hust/forumdisplay.php?f=176)
-   -   【转帖】关于textstyle 的 xscale (http://www.dimcax.com/hust/showthread.php?t=9333)

yang686526 2009-04-20 07:54 PM

【转帖】关于textstyle 的 xscale
 
关于textstyle 的 xscale
www.dimcax.com
关于textstyle 的 xscale
下面的代码实现了添加一个style: public static objectid addtextstyle(string stylename) { objectid id; database db = tools.database; dbtransman tm = tools.transactionmanager; transaction ta = tm.starttransaction(); textstyletable textstyletable = (textstyletable)tm.getobject(db.textstyletableid, openmode.forread, false); if (textstyletable.has(stylename)) { id = textstyletable[stylename]; } else { textstyletable.upgradeopen(); textstyletablerecord textstylerec = new textstyletablerecord(); textstylerec.name = stylename; textstylerec.xscale = 0.8; textstylerec.filename = "romans.shx"; textstylerec.bigf; id = textstyletable.add(textstylerec); tm.addnewlycreateddbobject(textstylerec, true); } ta.commit(); ta.dispose(); return id; } 并可用:tools.database.textstyle = addtextstyle("断面");置为当前的style 也可以新建dbtext时候设置dbtext.textstyle = addtextstyle("断面"); 实现设置文本的style 但是上面的代码执行时却没使得xscale = 0.8;生效,文本的宽度比例依然是1 请教各位如何解决?
不知道xscale与 widthfactor是什么关系
就是这个问题设置了xscale不起作用新建字体的时后用widthfactor是可以的 不知道有谁能解决以下


所有的时间均为北京时间。 现在的时间是 06:50 AM.