Преглед на файлове

avoid pattern clipping (thanks for ideas Glynn, Jorge);
add new railroad and zigzag patterns;
accept 'pattern' as alias to 'pat' instruction; fix docs
(merge from devbr6)


git-svn-id: https://svn.osgeo.org/grass/grass/trunk@37300 15284696-431f-4ddb-bdfa-cd5b030d7da7

Hamish Bowman преди 16 години
родител
ревизия
89db9a2bfe

+ 13 - 7
ps/ps.map/patterns/cross_diag5.eps

@@ -1,9 +1,15 @@
 %!PS-Adobe-2.0 EPSF-1.2
 %%BoundingBox: 0 0 10 10
-newpath
-0 5 moveto
-5 0 lineto
-stroke
-0 0 moveto
-5 5 lineto
-stroke
+0 4.5 moveto
+0.5 5 lineto
+5 0.5 lineto
+4.5 0 lineto
+closepath
+fill
+%
+0 0.5 moveto
+4.5 5 lineto
+5 4.5 lineto
+0.5 0 lineto
+closepath
+fill

+ 16 - 2
ps/ps.map/patterns/diag_down.eps

@@ -1,6 +1,20 @@
 %!PS-Adobe-2.0 EPSF-1.2
 %%BoundingBox: 0 0 10 10
-newpath
 0 10 moveto
+0.5 10 lineto
+10 0.5 lineto
 10 0 lineto
-stroke
+9.5 0 lineto
+0 9.5 lineto
+closepath
+fill
+0 0.5 moveto
+0 0 lineto
+0.5 0 lineto
+closepath
+fill
+9.5 10 moveto
+10 10 lineto
+10 9.5 lineto
+closepath
+fill

+ 17 - 4
ps/ps.map/patterns/diag_down6.eps

@@ -1,6 +1,19 @@
 %!PS-Adobe-2.0 EPSF-1.2
 %%BoundingBox: 0 0 10 10
-newpath
-0 6 moveto
-6 0 lineto
-stroke
+6 10 moveto
+6.5 10 lineto
+10 6.5 lineto
+10 5.5 lineto
+5.5 10 lineto
+closepath
+fill
+5.5 0 moveto
+6.5 0 lineto
+6 0.5 lineto
+closepath
+fill
+0 5.5 moveto
+0 6.5 lineto
+0.5 6 lineto
+closepath
+fill

+ 33 - 4
ps/ps.map/patterns/diag_down_dash.eps

@@ -1,9 +1,38 @@
 %!PS-Adobe-2.0 EPSF-1.2
 %%BoundingBox: 0 0 10 10
-newpath
 0 10 moveto
+0.5 10 lineto
+10 0.5 lineto
 10 0 lineto
-stroke
+9.5 0 lineto
+0 9.5 lineto
+closepath
+fill
+0 0.5 moveto
+0 0 lineto
+0.5 0 lineto
+closepath
+fill
+9.5 10 moveto
+10 10 lineto
+10 9.5 lineto
+closepath
+fill
+%
 5 10 moveto
-10 5 lineto
-stroke
+5.5 10 lineto
+10 5.5 lineto
+10 4.5 lineto
+4.5 10 lineto
+closepath
+fill
+4.5 0 moveto
+5.5 0 lineto
+5 0.5 lineto
+closepath
+fill
+0 4.5 moveto
+0 5.5 lineto
+0.5 5 lineto
+closepath
+fill

+ 16 - 2
ps/ps.map/patterns/diag_up.eps

@@ -1,6 +1,20 @@
 %!PS-Adobe-2.0 EPSF-1.2
 %%BoundingBox: 0 0 10 10
-newpath
 0 0 moveto
+0 0.5 lineto
+9.5 10 lineto
 10 10 lineto
-stroke
+10 9.5 lineto
+0.5 0 lineto
+closepath
+fill
+9.5 0 moveto
+10 0 lineto
+10 0.5 lineto
+closepath
+fill
+0 9.5 moveto
+0 10 lineto
+0.5 10 lineto
+closepath
+fill

+ 17 - 4
ps/ps.map/patterns/diag_up6.eps

@@ -1,6 +1,19 @@
 %!PS-Adobe-2.0 EPSF-1.2
 %%BoundingBox: 0 0 10 10
-newpath
-0 0 moveto
-6 6 lineto
-stroke
+0 6 moveto
+0 6.5 lineto
+3.5 10 lineto
+4.5 10 lineto
+0 5.5 lineto
+closepath
+fill
+3.5 0 moveto
+4.5 0 lineto
+4 0.5 lineto
+closepath
+fill
+10 5.5 moveto
+10 6.5 lineto
+9.5 6 lineto
+closepath
+fill

+ 33 - 4
ps/ps.map/patterns/diag_up_dash.eps

@@ -1,9 +1,38 @@
 %!PS-Adobe-2.0 EPSF-1.2
 %%BoundingBox: 0 0 10 10
-newpath
 0 0 moveto
+0 0.5 lineto
+9.5 10 lineto
 10 10 lineto
-stroke
+10 9.5 lineto
+0.5 0 lineto
+closepath
+fill
+9.5 0 moveto
+10 0 lineto
+10 0.5 lineto
+closepath
+fill
+0 9.5 moveto
+0 10 lineto
+0.5 10 lineto
+closepath
+fill
+%
 0 5 moveto
-5 10 lineto
-stroke
+0 5.5 lineto
+4.5 10 lineto
+5.5 10 lineto
+0 4.5 lineto
+closepath
+fill
+4.5 0 moveto
+5.5 0 lineto
+5 0.5 lineto
+closepath
+fill
+10 4.5 moveto
+10 5.5 lineto
+9.5 5 lineto
+closepath
+fill

+ 23 - 0
ps/ps.map/patterns/horiz_zigzag.eps

@@ -0,0 +1,23 @@
+%!PS-Adobe-2.0 EPSF-1.2
+%%BoundingBox: 0 0 10 10
+0 0 moveto
+0 0.5 lineto
+5 5.5 lineto
+10 0.5 lineto
+10 0 lineto
+9.5 0 lineto
+5 4.5 lineto
+0.5 0 lineto
+closepath
+fill
+%
+9.5 10 moveto
+10 9.5 lineto
+10 10 lineto
+closepath
+fill
+0 9.5 moveto
+0 10 lineto
+0.5 10 lineto
+closepath
+fill

+ 38 - 0
ps/ps.map/patterns/railroad_down.eps

@@ -0,0 +1,38 @@
+%!PS-Adobe-2.0 EPSF-1.2
+%%BoundingBox: 0 0 10 10
+0 10 moveto
+0.5 10 lineto
+10 0.5 lineto
+10 0 lineto
+9.5 0 lineto
+0 9.5 lineto
+closepath
+fill
+0 0.5 moveto
+0 0 lineto
+0.5 0 lineto
+closepath
+fill
+9.5 10 moveto
+10 10 lineto
+10 9.5 lineto
+closepath
+fill
+%
+0 5 moveto
+0 5.5 lineto
+4.5 10 lineto
+5.5 10 lineto
+0 4.5 lineto
+closepath
+fill
+4.5 0 moveto
+5.5 0 lineto
+5 0.5 lineto
+closepath
+fill
+10 4.5 moveto
+10 5.5 lineto
+9.5 5 lineto
+closepath
+fill

+ 38 - 0
ps/ps.map/patterns/railroad_up.eps

@@ -0,0 +1,38 @@
+%!PS-Adobe-2.0 EPSF-1.2
+%%BoundingBox: 0 0 10 10
+0 0 moveto
+0 0.5 lineto
+9.5 10 lineto
+10 10 lineto
+10 9.5 lineto
+0.5 0 lineto
+closepath
+fill
+9.5 0 moveto
+10 0 lineto
+10 0.5 lineto
+closepath
+fill
+0 9.5 moveto
+0 10 lineto
+0.5 10 lineto
+closepath
+fill
+%
+5 10 moveto
+5.5 10 lineto
+10 5.5 lineto
+10 4.5 lineto
+4.5 10 lineto
+closepath
+fill
+4.5 0 moveto
+5.5 0 lineto
+5 0.5 lineto
+closepath
+fill
+0 4.5 moveto
+0 5.5 lineto
+0.5 5 lineto
+closepath
+fill

+ 23 - 0
ps/ps.map/patterns/vert_zigzag.eps

@@ -0,0 +1,23 @@
+%!PS-Adobe-2.0 EPSF-1.2
+%%BoundingBox: 0 0 10 10
+0 0 moveto
+0 0.5 lineto
+4.5 5 lineto
+0 9.5 lineto
+0 10 lineto
+0.5 10 lineto
+5.5 5 lineto
+0.5 0 lineto
+closepath
+fill
+%
+9.5 10 moveto
+10 9.5 lineto
+10 10 lineto
+closepath
+fill
+9.5 0 moveto
+10 0 lineto
+10 0.5 lineto
+closepath
+fill

+ 4 - 3
ps/ps.map/ps.map.html

@@ -1299,9 +1299,10 @@ first vector is used.
 <B>pat</B> - full path to pattern file. The pattern file contains header and
 simple PostScript commands. It is similar to EPS but more limited, meaning that
 while each pattern file is a true EPS file, most EPS files are not useful as pattern
-files because they contain restricted commands. Color and width of patterns are set
-by <B>fcolor</B> (red, green, ..., none, R:G:B) and <B>width</B> until
-overwritten in the pattern file.
+files because they contain restricted commands. Color <!-- and width --> of patterns
+are set by <B>fcolor</B> (red, green, ..., none, R:G:B)<!-- no?  and <B>width</B>
+until overwritten in the pattern file -->. Color of the boundaries remain set
+by the <B>color</B> instruction.
 Pattern may be scaled with the <b>scale</b> command. Several standard hatching
 patterns are provided in <tt>$GISBASE/etc/paint/patterns/</tt>.
 Demonstrative images can be found on the

+ 1 - 1
ps/ps.map/r_vareas.c

@@ -170,7 +170,7 @@ int read_vareas(char *name, char *mapset)
 	    continue;
 	}
 
-	if (KEY("pat")) {
+	if (KEY("pat") || KEY("pattern")) {
 	    G_chop(data);
 	    vector.layer[vec].pat = G_store(data);
 	    continue;