|
@@ -95,51 +95,28 @@ Several environment variables affect the operation of the Cairo driver:
|
|
|
|
|
|
<H3>Examples</H3>
|
|
<H3>Examples</H3>
|
|
|
|
|
|
-Example using the driver directly (bash-syntax):
|
|
|
|
|
|
+Example using the driver to generate a PNG file (bash-syntax):
|
|
<div class="code"><PRE>
|
|
<div class="code"><PRE>
|
|
export GRASS_PNGFILE=spearfish.png
|
|
export GRASS_PNGFILE=spearfish.png
|
|
export GRASS_WIDTH=800
|
|
export GRASS_WIDTH=800
|
|
export GRASS_HEIGHT=800
|
|
export GRASS_HEIGHT=800
|
|
|
|
+export GRASS_RENDER_IMMEDIATE=CAIRO
|
|
|
|
|
|
-d.mon start=cairo
|
|
|
|
d.rast map=elevation.10m
|
|
d.rast map=elevation.10m
|
|
d.vect map=streams width=1 color=blue fcolor=aqua type=area,line
|
|
d.vect map=streams width=1 color=blue fcolor=aqua type=area,line
|
|
d.vect map=roads width=2
|
|
d.vect map=roads width=2
|
|
-d.mon stop=cairo
|
|
|
|
</PRE></div>
|
|
</PRE></div>
|
|
|
|
|
|
-Example using <em><a href="d.out.file.html">d.out.file</a></em>:
|
|
|
|
|
|
+Example using the driver to generate a PDF file (bash-syntax):
|
|
<div class="code"><PRE>
|
|
<div class="code"><PRE>
|
|
-d.mon x0
|
|
|
|
|
|
+export GRASS_PNGFILE=spearfish.pdf
|
|
|
|
+export GRASS_WIDTH=800
|
|
|
|
+export GRASS_HEIGHT=800
|
|
|
|
+export GRASS_RENDER_IMMEDIATE=CAIRO
|
|
|
|
+
|
|
d.rast map=elevation.10m
|
|
d.rast map=elevation.10m
|
|
d.vect map=streams width=1 color=blue fcolor=aqua type=area,line
|
|
d.vect map=streams width=1 color=blue fcolor=aqua type=area,line
|
|
d.vect map=roads width=2
|
|
d.vect map=roads width=2
|
|
-
|
|
|
|
-d.out.file -c sf_cairo format=png size=800,800
|
|
|
|
-</PRE></div>
|
|
|
|
-
|
|
|
|
-<P>
|
|
|
|
-A more complicated example using <em><a href="d.out.file.html">d.out.file</a></em>:
|
|
|
|
-<div class="code"><PRE>
|
|
|
|
-r.shaded.relief map=elevation.dem
|
|
|
|
-r.watershed elev=elevation.dem basin=watershed.basin thresh=10000
|
|
|
|
-
|
|
|
|
-d.mon x1
|
|
|
|
-d.shadedmap rel=elevation.dem.shade drape=watershed.basin bright=30
|
|
|
|
-d.vect streams color=aqua fcolor=aqua type=area,line
|
|
|
|
-d.vect roads where="label ~ 'light-duty road'" color=grey
|
|
|
|
-d.vect roads where="label ~ 'unimproved'" color=orange
|
|
|
|
-d.vect roads where="label ~ 'secondary highway'" color=100:100:100 width=2
|
|
|
|
-d.vect roads where="label ~ 'primary highway'" color=50:50:50 width=2
|
|
|
|
-d.vect railroads col=red width=2
|
|
|
|
-d.vect roads where="label = 'interstate'" color=black width=3
|
|
|
|
-
|
|
|
|
-d.vect archsites icon=basic/star size=25 fcolor=yellow
|
|
|
|
-
|
|
|
|
-d.font Andale_Mono
|
|
|
|
-echo "Spearfish, SD" | d.text color=black at=28,53 -b
|
|
|
|
-
|
|
|
|
-d.out.file -c sf_cairo2 format=png
|
|
|
|
</PRE></div>
|
|
</PRE></div>
|
|
|
|
|
|
|
|
|
|
@@ -160,24 +137,17 @@ if the selected format doesn't support a necessary feature, Cairo may
|
|
fall back on rendering a bitmap representation of the image wrapped in
|
|
fall back on rendering a bitmap representation of the image wrapped in
|
|
the selected vector format.
|
|
the selected vector format.
|
|
|
|
|
|
-<P>
|
|
|
|
-Cairo driver output via <em><A HREF="d.out.file.html">d.out.file</A></em>
|
|
|
|
-is supported via the -c flag.</P>
|
|
|
|
-
|
|
|
|
<h2>SEE ALSO</h2>
|
|
<h2>SEE ALSO</h2>
|
|
<EM>
|
|
<EM>
|
|
-<A HREF="htmlmapdriver.html">HTMLMAP driver</A>,
|
|
|
|
<A HREF="pngdriver.html">PNG driver</A>,
|
|
<A HREF="pngdriver.html">PNG driver</A>,
|
|
<A HREF="psdriver.html">PostScript driver</A>,
|
|
<A HREF="psdriver.html">PostScript driver</A>,
|
|
-<A href="xdriver.html">XDRIVER</A>
|
|
|
|
<BR>
|
|
<BR>
|
|
<A HREF="d.frame.html">d.frame</A>,
|
|
<A HREF="d.frame.html">d.frame</A>,
|
|
-<A href="d.mon.html">d.mon</A>,
|
|
|
|
<A href="d.rast.html">d.rast</A>,
|
|
<A href="d.rast.html">d.rast</A>,
|
|
<A href="d.vect.html">d.vect</A>
|
|
<A href="d.vect.html">d.vect</A>
|
|
-<A href="d.out.file.html">d.out.file</A>
|
|
|
|
</EM>
|
|
</EM>
|
|
|
|
|
|
<H2>AUTHOR</H2>
|
|
<H2>AUTHOR</H2>
|
|
Lars Ahlzen <<I>lars (at) ahlzen.com</I>><BR>
|
|
Lars Ahlzen <<I>lars (at) ahlzen.com</I>><BR>
|
|
and the GRASS Development Team.
|
|
and the GRASS Development Team.
|
|
|
|
+
|