关于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是可以的 不知道有谁能解决以下