Article View: comp.lang.postscript
Article #635box function
From: Bryce Jasmer
Date: Fri, 30 Jun 1989 06:15
Date: Fri, 30 Jun 1989 06:15
26 lines
1011 bytes
1011 bytes
I'm curious as to why there is no box operator in postscript. (note: I only
know about Adobe PS version 1.0 so if a later version has a box operator than
you are permitted to flame me.)
What is the best way to draw a box in postscript? I have written a macro
that does the work but I am wondering if there is a better way to
draw a box (better code, faster code, etc).
% box
% call like this: x y width height box
% bottom - STACK - top
/box { x y w h
4 2 roll w h x y
moveto w h
dup w h h
0 exch rlineto w h
exch h w
0 rlineto h
neg 0 exch rlineto -
closepath
} def
-----------
Bryce Jasmer
jasmerb@hobbes.cs.orst.edu
Technical Details
Message-ID:
<11455@orstcs.CS.ORST.EDU>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!rutgers!orstcs!mist!jasmerbShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!rutgers!orstcs!mist!jasmerb From: jasmerb@mist.CS.ORST.EDU (Bryce Jasmer) Newsgroups: comp.lang.postscript Subject: box function Message-ID: <11455@orstcs.CS.ORST.EDU> Date: 30 Jun 89 06:15:15 GMT Sender: usenet@orstcs.CS.ORST.EDU Lines: 26