home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1993 #2 / Image.iso / os2 / gspm25.zip / ppath.ps < prev    next >
Text File  |  1992-09-05  |  917b  |  33 lines

  1. % Redefine pathforall for tracing.
  2. % Can't be used recursively.
  3.  
  4. /# {( )print} def
  5.  
  6. /-pathforall /pathforall load def
  7. /-p2 { ( ) print exch =only ( ) print =only } bind def
  8. /-tp2 { transform -p2 } bind def
  9. /-dict 5 dict def
  10.  
  11. /pathforall
  12.  { -dict begin
  13.    /-close exch def  /-curve exch def  /-line exch def  /-move exch def
  14.    end
  15.    {2 copy -p2 ( moveto\t%)print
  16.     2 copy -tp2 (\n)print
  17.     flush  -dict /-move get exec}
  18.    {2 copy -p2 ( lineto\t%)print
  19.     2 copy -tp2 (\n)print
  20.     flush  -dict /-line get exec}
  21.    {5 index 5 index -p2 3 index 3 index -p2 2 copy -p2 ( curveto\t%)print
  22.     5 index 5 index -tp2 3 index 3 index -tp2 2 copy -tp2 (\n)print
  23.     flush  -dict /-curve get exec}
  24.    {(closepath\n)print flush   -dict /-close get exec}
  25.    -pathforall
  26.   }
  27.  def
  28.  
  29. % Just print the current path
  30.  
  31. /printpath
  32.  { {pop pop} {pop pop} {pop pop pop pop pop pop} {} pathforall } def
  33.