2 % Copyright (C) 1994 Aladdin Enterprises. All rights reserved.
4 % This software is provided AS-IS with no warranty, either express or
7 % This software is distributed under license and may not be copied,
8 % modified or distributed except as expressly authorized under the terms
9 % of the license contained in the file LICENSE in this distribution.
11 % For more information about licensing, please refer to
12 % http://www.ghostscript.com/licensing/. For information on
13 % commercial licensing, go to http://www.artifex.com/licensing/ or
14 % contact Artifex Software, Inc., 101 Lucas Valley Road #110,
15 % San Rafael, CA 94903, U.S.A., +1(415)492-9861.
17 % $Id: zeroline.ps,v 1.4 2002/02/21 21:49:28 giles Exp $
19 % Test file to determine how other PostScript implementations handle
20 % filling zero-width lines under a variety of conditions.
22 % Add a small "fan" of zero-width lines at different angles to the path.
24 { currentpoint 100 0 rlineto
25 2 copy moveto 100 20 rlineto
26 2 copy moveto 100 100 rlineto
27 2 copy moveto 20 100 rlineto
31 % Append a rectangle to the current path.
33 { 4 -2 roll moveto 1 index 0 rlineto 0 exch rlineto
34 neg 0 rlineto closepath
38 { gsave newpath rectappend fill grestore
42 { gsave newpath rectappend stroke grestore
44 % Clip to a rectangle. Unlike the real rectclip,
45 % this clear the current path.
47 { newpath rectappend clip newpath
52 % Display fans of different colors on different backgrounds.
55 0 0 120 120 rectstroke
59 0 0 120 120 rectstroke
70 % Display rectangles with two edges coincident.
79 40 0 -20 20 rectappend
84 % Display superimposed lines.
88 2 copy moveto 20 0 rmoveto 50 0 rlineto
89 2 copy moveto 20 4 rmoveto 50 10 rlineto
90 2 copy moveto 20 20 rmoveto 50 50 rlineto
91 2 copy moveto 4 20 rmoveto 10 50 rlineto
92 moveto 0 20 rmoveto 0 50 rlineto
96 140 0 translate 0 0 moveto super eofill