Article View: comp.lang.postscript
Article #1566Re: Drawing lots of triangles
From: Allen Crider
Date: Fri, 19 Jan 1990 06:49
Date: Fri, 19 Jan 1990 06:49
36 lines
1814 bytes
1814 bytes
>%!
>%%BoundingBox: 0 0 612 792
>%%EndComments
%initgraphics--no need for initgraphics
>8.5 72 mul 0 translate 90 rotate 72 1000 div dup scale
>2.0 setmiterlimit
%60 45 {add .5 mul} setscreen--no need to do a setscreen
--who wants a 60 line screen if printing
--to a Lino?
%/NP {newpath} def--how bout /NP{}def?
> /SD {setdash} def
>/SG {99 div setgray} def /MT {moveto} def--use bind def
>/LT {lineto} def /CP {closepath} def /GS {gsave} def /FL {fill} def
>/GR {grestore} def /SK {stroke} def /LW {setlinewidth} def
>/PLP {1024 1 true [1024 0 0 1 0 0] {<8080808080808080>} imagemask} def
>/WLP {1024 1 true [1024 0 0 1 0 0] {<8888888888888888>} imagemask} def
%erasepage--what's on the page to erase?
>[... other graphics stuff deleted, triangles follow]
> NP 8761 6576 MT %the newpath before every triangle is a waste
>8781 6584 LT
>8782 6574 LT
>8761 6576 LT
>CP GS 99 SG FL GR %three lines make a triangle:why the closepath?
%These triangles aren't being stroked, there isn't
%any need to do a gsave, grestore
%how about:
/FL {99 div setgray fill} bind def
/SFL{gsave 99 div setgray fill grestore stroke} bind def
we would get:
8761 6576 MT
8781 6584 LT
8782 6574 LT
8761 6576 LT
99 FL
I'm sure others could improve on this, I'm just a typographer.
Technical Details
Message-ID:
<926@wet.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!cs.utexas.edu!tut.cis.ohio-state.edu!ucbvax!ucsfcgl!cca.ucsf.edu!wet!capslockReferences:
<9561@batcomputer.tn.cornell.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!cs.utexas.edu!tut.cis.ohio-state.edu!ucbvax!ucsfcgl!cca.ucsf.edu!wet!capslock From: capslock@wet.UUCP (Allen Crider) Newsgroups: comp.lang.postscript Subject: Re: Drawing lots of triangles Message-ID: <926@wet.UUCP> Date: 19 Jan 90 06:49:34 GMT References: <9561@batcomputer.tn.cornell.edu> Reply-To: capslock@wet.UUCP (Allen Crider) Distribution: na Organization: Wetware Diversions, San Francisco Lines: 36