🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.postscript
Article #954

PostScript Toolset: More Comments, and Diag.ps

#954
From: Clayton Cramer
Date: Tue, 29 Aug 1989 22:35
27 lines
1600 bytes
It's tempting to redefine "moveto" to "m" for reasons of size and
speed, but when distributing such tools, it's worthwhile to keep 
keywords completely undefined so that you can more easily follow 
the code, and so that you don't end up with a core of dozens or 
hundreds of defs (some interlocking) that you need to make the
tools work.  Think of these tools as prototyping tools -- you'll
probably merge them together and work on speed and size enhancements
once you have it all working.

%!
/Diag{ % draw diagonal line (start x, start y, angle, length, line gray, width)
      gsave 
      /Width exch def /Gray exch def 
      /Len exch def /Ang exch def /Y exch def /X exch def 
      newpath X Y moveto X Len Ang cos mul add 
      Y Len Ang sin mul add lineto Width setlinewidth Gray setgray stroke
      grestore} bind def
%%DEMO
0 0 60 700 0.60 1 Diag
100 100 45 500 0.40 12 Diag
0 0 30 200 0.1 4 Diag
showpage
-- 
Clayton E. Cramer {pyramid,pixar,tekbspa}!optilink!cramer
"No man is an island" is the beginning of the end of personal freedom.
----------------------------------------------------------------------------
Disclaimer?  You must be kidding!  No company would hold opinions like mine!
Technical Details
Message-ID: <2253@optilink.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.csd.uwm.edu!lll-winken!tekbspa!optilink!cramer

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.csd.uwm.edu!lll-winken!tekbspa!optilink!cramer
From: cramer@optilink.UUCP (Clayton Cramer)
Newsgroups: comp.lang.postscript
Subject: PostScript Toolset: More Comments, and Diag.ps
Message-ID: <2253@optilink.UUCP>
Date: 29 Aug 89 22:35:09 GMT
Organization: Optilink Corporation, Petaluma, CA
Lines: 27