home *** CD-ROM | disk | FTP | other *** search
/ jppd.dyndns.org / jppd.dyndns.org.tar / jppd.dyndns.org / QUERYPRO / Impressora_PDF / converter.exe / GPLGS / markpath.ps < prev    next >
Text File  |  2002-02-22  |  2KB  |  60 lines

  1. %    Copyright (C) 1993 Aladdin Enterprises.  All rights reserved.
  2. % This software is provided AS-IS with no warranty, either express or
  3. % implied.
  4. % This software is distributed under license and may not be copied,
  5. % modified or distributed except as expressly authorized under the terms
  6. % of the license contained in the file LICENSE in this distribution.
  7. % For more information about licensing, please refer to
  8. % http://www.ghostscript.com/licensing/. For information on
  9. % commercial licensing, go to http://www.artifex.com/licensing/ or
  10. % contact Artifex Software, Inc., 101 Lucas Valley Road #110,
  11. % San Rafael, CA  94903, U.S.A., +1(415)492-9861.
  12.  
  13. % $Id: markpath.ps,v 1.4 2002/02/21 21:49:28 giles Exp $
  14. % markpath.ps
  15. % Mark the corners of a path, drawing it slowly if desired.
  16.  
  17. /Delay where { pop } { /Delay 0 def } ifelse
  18. /setxy0
  19.  { currentpoint /y0 exch def /x0 exch def
  20.  } def
  21. /bip
  22.  { epsx epsy idtransform /ey exch def /ex exch def
  23.    currentpoint ex 2 div ey 2 div rlineto currentpoint 0 ey neg rlineto
  24.    ex neg 0 rlineto 0 ey rlineto lineto lineto
  25.    stroke
  26.  } def
  27. /dally
  28.  { Delay { } repeat
  29.    Delay 0 ne { flushpage } if
  30.  } def
  31. /movebip
  32.  { /xs 2 index def /ys 1 index def
  33.    gsave newpath mpmx transform moveto setxy0 bip grestore
  34.  } def
  35. /linebip
  36.  { gsave newpath x0 y0 moveto mpmx transform lineto setxy0 bip dally grestore
  37.  } def
  38. /curvebip
  39.  { gsave newpath x0 y0 moveto 5 index 5 index mpmx transform lineto bip
  40.    2 copy mpmx transform moveto 3 index 3 index mpmx transform lineto bip
  41.    x0 y0 moveto
  42.    3 { mpmx transform 6 2 roll } repeat
  43.    curveto setxy0 bip dally grestore
  44.  } def
  45. /closebip
  46.  { xs ys linebip
  47.  } def
  48.  
  49. /markpath        % <matrix> markpath -
  50.  { /mpmx exch def 
  51.    gsave initgraphics 9 dup dtransform grestore
  52.      /epsy exch def   /epsx exch def
  53.    gsave 0 setlinewidth
  54.     { movebip } { linebip } { curvebip } { closebip } pathforall
  55.    grestore
  56.  } def
  57.