3 .\" Define the PSPIC macro.
5 .\" When used other than with -Tps, -Tdvi, or -Thtml it will draw a box
6 .\" around where the picture would go.
13 . HTML-DO-IMAGE \\$1 l
19 . HTML-DO-IMAGE \\$1 r
24 . nr ps-offset (m;\\$2)
26 . HTML-DO-IMAGE \\$1 i
29 . HTML-DO-IMAGE \\$1 c
36 . if (\\n[llx] : \\n[lly] : \\n[urx] : \\n[ury]) \{\
37 . nr ps-wid (\\n[urx] - \\n[llx])
38 . nr ps-ht (\\n[ury] - \\n[lly])
39 . if (\\n[ps-wid] < 0) \
40 . nr ps-wid (-\\n[ps-wid])
41 . if (\\n[ps-ht] < 0) \
42 . nr ps-ht (-\\n[ps-ht])
44 . nr ps-deswid (i;\\$2)
46 . nr ps-deswid ((\\n[.l] - \\n[.i]) <? \\n[ps-wid]p)
47 . nr ps-desht (\\n[ps-deswid] * 1000 + (\\n[ps-wid] / 2) \
48 / \\n[ps-wid] * \\n[ps-ht] \
50 . if ((\\n[.$] >= 3) & (\\n[ps-desht] > (i;0\\$3))) \{\
51 . nr ps-desht (i;\\$3)
52 . nr ps-deswid (\\n[ps-desht] * 1000 + (\\n[ps-ht] / 2) \
53 / \\n[ps-ht] * \\n[ps-wid] \
57 . ne (\\n[ps-desht]u + 1v)
59 . if (\\n[ps-offset-mode] == 0) \
60 . nr ps-offset (\\n[.l] - \\n[.i] - \\n[ps-deswid] / 2)
61 . if (\\n[ps-offset-mode] == 1) \
63 . if (\\n[ps-offset-mode] == 2) \
64 . nr ps-offset (\\n[.l] - \\n[.i] - \\n[ps-deswid])
67 . ie (\\n[ps-wid]p == \\n[ps-deswid]) \{\
68 . ds ps-scale \" empty
69 . ds ps-hoffset hoffset=-\\n[llx]
70 . ds ps-voffset voffset=-\\n[lly]
73 . nr ps-scale (\\n[ps-deswid] * 100 / \\n[ps-wid]p)
74 . nr ps-hoffset (-\\n[llx] * \\n[ps-scale] / 100)
75 . nr ps-voffset (-\\n[lly] * \\n[ps-scale] / 100)
76 . ds ps-scale hscale=\\n[ps-scale] vscale=\\n[ps-scale]
77 . ds ps-hoffset hoffset=\\n[ps-hoffset]
78 . ds ps-voffset voffset=\\n[ps-voffset]
83 \X'psfile=\\$1 \\*[ps-hoffset] \\*[ps-voffset] \\*[ps-scale]'
87 . ds ps-desht \\n[ps-desht]
89 . ds ps-desht \" empty
93 \Z'\D'p 0 \\n[ps-desht]u \\n[ps-deswid]u 0 0 -\\n[ps-desht]u''\
97 \\$1 \\n[llx] \\n[lly] \\n[urx] \\n[ury] \\n[ps-deswid] \\*[ps-desht]'
106 .\" end of pspic.tmac