查看单个帖子
旧 2009-04-20, 07:54 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】关于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是可以的 不知道有谁能解决以下
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)