【发布时间】:2017-01-23 11:30:12
【问题描述】:
我开发了一个函数来在 postscript 中创建一个简单的复选框,但它似乎仍然不起作用。 生成矩形没有问题,但是在写行的过程中似乎抛出了异常(使复选框的经典X)。
/nocurrentpoint in --nocurrentpoint--
这是我的代码。
/doMarkedCheckBox {
0.1 setlinewidth
currentpoint
/yIniChk exch def
/xIniChk exch def
xIniChk
yIniChk
DimChars
DimChars
rectstroke
xIniChk DimChars add yIniChk DimChars add lineto
0 DimChars 0 sub moveto
yIniChk DimChars add xIniChk lineto
stroke
} bind def
有人可以解释如何正确地做到这一点吗? 提前致谢。
【问题讨论】:
-
这是一个过程定义,你在哪里调用过程?
currentpoint仅在您之前执行moveto时有效(或任何其他设置当前点的命令)。在您自己设置之前没有当前点。 (平移或其他变换也不设置当前点)
标签: postscript