Tutorial by Examples

This example attempts to mimic the behavior of the built-in path construction operators like arc. If there is a current point, poly first draws a line to (x,y)+(r,0), otherwise it starts by moving to that point. Instead of gsave ... grestore (which has the undesirable effect of discarding the very...
This snippet dumps the contents of the current path to stdout. It uses the ghostscript procedure =only which may not be available on all interpreters. An equivalent procedure on Adobe interpreters is called =print. pathforall is a looping operator which takes 4 procedure bodies as arguments which a...
/in {72 mul} def /delta {1 in 10 div} def /X 612 def /Y 792 def 0 delta Y { 0 1 index X exch % i 0 X i moveto exch % 0 i lineto stroke } for 0 delta X { 0 1 index Y % i 0 i Y moveto % i 0 lineto stroke } for showpage

Page 1 of 1