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