61 lines
1.7 KiB
Plaintext
61 lines
1.7 KiB
Plaintext
|
.\" pspic.tmac
|
||
|
.\"
|
||
|
.\" Define the PSPIC macro.
|
||
|
.\" When used other than with -Tps, it will draw a box around where
|
||
|
.\" the picture would go.
|
||
|
.de PSPIC
|
||
|
.nr ps-offset-mode 0
|
||
|
.ie '\\$1'-L' \{\
|
||
|
. nr ps-offset-mode 1
|
||
|
. shift
|
||
|
. HTML-DO-IMAGE \\$1 l
|
||
|
.\}
|
||
|
.el \{\
|
||
|
. ie '\\$1'-R' \{\
|
||
|
. nr ps-offset-mode 2
|
||
|
. shift
|
||
|
. HTML-DO-IMAGE \\$1 r
|
||
|
. \}
|
||
|
. el \{\
|
||
|
. if '\\$1'-I' \{\
|
||
|
. nr ps-offset-mode 3
|
||
|
. nr ps-offset (m;\\$2)
|
||
|
. shift 2
|
||
|
. \}
|
||
|
. HTML-DO-IMAGE \\$1 i
|
||
|
. \}
|
||
|
.\}
|
||
|
.br
|
||
|
.psbb \\$1
|
||
|
.if (\\n[llx] : \\n[lly] : \\n[urx] : \\n[ury]) \{\
|
||
|
. nr ps-wid (\\n[urx]-\\n[llx])
|
||
|
. nr ps-ht (\\n[ury]-\\n[lly])
|
||
|
. if \\n[ps-wid]<0 .nr ps-wid 0-\\n[ps-wid]
|
||
|
. if \\n[ps-ht]<0 .nr ps-ht 0-\\n[ps-ht]
|
||
|
. ie \\n[.$]>=2 .nr ps-deswid (i;\\$2)
|
||
|
. el .nr ps-deswid \\n[.l]-\\n[.i]<?\\n[ps-wid]p
|
||
|
. nr ps-desht \\n[ps-deswid]*1000+(\\n[ps-wid]/2)/\\n[ps-wid]\
|
||
|
*\\n[ps-ht]+500/1000
|
||
|
. if \\n[.$]>=3&(\\n[ps-desht]>(i;0\\$3)) \{\
|
||
|
. nr ps-desht (i;\\$3)
|
||
|
. nr ps-deswid \\n[ps-desht]*1000+(\\n[ps-ht]/2)/\\n[ps-ht]\
|
||
|
*\\n[ps-wid]+500/1000
|
||
|
. \}
|
||
|
. ne \\n[ps-desht]u+1v
|
||
|
. if \\n[ps-offset-mode]=0 .nr ps-offset \\n[.l]-\\n[.i]-\\n[ps-deswid]/2
|
||
|
. if \\n[ps-offset-mode]=1 .nr ps-offset 0
|
||
|
. if \\n[ps-offset-mode]=2 .nr ps-offset \\n[.l]-\\n[.i]-\\n[ps-deswid]
|
||
|
. ie \\n[.$]>=3 .ds ps-desht \\n[ps-desht]
|
||
|
. el .ds ps-desht \" empty
|
||
|
\h'\\n[ps-offset]u'\
|
||
|
\X'ps: invis'\
|
||
|
\Z'\D'p 0 \\n[ps-desht]u \\n[ps-deswid]u 0 0 -\\n[ps-desht]u''\
|
||
|
\X'ps: endinvis'\
|
||
|
\v'\\n[ps-desht]u'\X'ps: import \\$1 \
|
||
|
\\n[llx] \\n[lly] \\n[urx] \\n[ury] \\n[ps-deswid] \\*[ps-desht]'
|
||
|
. br
|
||
|
. sp \\n[ps-desht]u
|
||
|
.\}
|
||
|
.HTML-IMAGE-END
|
||
|
..
|