1 .\" Define the PSPIC macro.
2 .\" When used other than with -Tps, it will draw a box around where
3 .\" the picture would go.
16 . nr ps-offset (m;\\$2)
21 .if (\\n[llx] : \\n[lly] : \\n[urx] : \\n[ury]) \{\
22 . nr ps-wid (\\n[urx]-\\n[llx])
23 . nr ps-ht (\\n[ury]-\\n[lly])
24 . if \\n[ps-wid]<0 .nr ps-wid 0-\\n[ps-wid]
25 . if \\n[ps-ht]<0 .nr ps-ht 0-\\n[ps-ht]
26 . ie \\n[.$]>=2 .nr ps-deswid (i;\\$2)
27 . el .nr ps-deswid \\n[.l]-\\n[.i]<?\\n[ps-wid]p
28 . nr ps-desht \\n[ps-deswid]*1000+(\\n[ps-wid]/2)/\\n[ps-wid]\
30 . if \\n[.$]>=3&(\\n[ps-desht]>(i;0\\$3)) \{\
31 . nr ps-desht (i;\\$3)
32 . nr ps-deswid \\n[ps-desht]*1000+(\\n[ps-ht]/2)/\\n[ps-ht]\
35 . ne \\n[ps-desht]u+1v
36 . if \\n[ps-offset-mode]=0 .nr ps-offset \\n[.l]-\\n[.i]-\\n[ps-deswid]/2
37 . if \\n[ps-offset-mode]=1 .nr ps-offset 0
38 . if \\n[ps-offset-mode]=2 .nr ps-offset \\n[.l]-\\n[.i]-\\n[ps-deswid]
39 . ie \\n[.$]>=3 .ds ps-desht \\n[ps-desht]
40 . el .ds ps-desht \" empty
43 \Z'\D'p 0 \\n[ps-desht]u \\n[ps-deswid]u 0 0 -\\n[ps-desht]u''\
45 \v'\\n[ps-desht]u'\X'ps: import \\$1 \
46 \\n[llx] \\n[lly] \\n[urx] \\n[ury] \\n[ps-deswid] \\*[ps-desht]'