File: psdriver.html

package info (click to toggle)
grass 8.4.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 277,040 kB
  • sloc: ansic: 460,798; python: 227,732; cpp: 42,026; sh: 11,262; makefile: 7,007; xml: 3,637; sql: 968; lex: 520; javascript: 484; yacc: 450; asm: 387; perl: 157; sed: 25; objc: 6; ruby: 4
file content (100 lines) | stat: -rw-r--r-- 2,924 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
<!-- meta page description: PostScript DISPLAY DRIVER -->

<em>PS display driver</em> to create PostScript files.

<h2>DESCRIPTION</h2>

The PS driver generates a PostScript file from GRASS display commands.

<h2>USAGE</h2>

<h3>Environment variables</h3>

The PS driver can be enabled by setting <b>GRASS_RENDER_IMMEDIATE</b>
variable, eg.

<div class="code"><pre>
export GRASS_RENDER_IMMEDIATE=ps
</pre></div>

Several environment variables affect the operation of the PS driver:

<ul>
  <li><b>GRASS_RENDER_WIDTH=xxx</b><br>
     the width of the image map (default is 640).
  </li>
  <li><b>GRASS_RENDER_HEIGHT=yyy</b><br>
    the height of the image map (default is 480).
  </li>
  <li><b>GRASS_RENDER_TRUECOLOR=[TRUE|FALSE]</b><br>
    sets true-color support. Default is FALSE.
  </li>
  <li><b>GRASS_RENDER_FILE</b><br>
    name of output file. If it ends with ".eps" an EPS file
    will be created.
  </li>
  <li><b>GRASS_RENDER_PS_PAPER</b><br>
    sets the screen dimensions and margins to
    fit a standard paper size, see also GRASS_RENDER_WIDTH, GRASS_RENDER_HEIGHT.
  </li>
  <li><b>GRASS_RENDER_PS_LANDSCAPE</b><br>
    if <code>TRUE</code>, the screen is rotated 90 degrees
    counter-clockwise so that a "landscape" screen fits better on
    "portrait" paper.
  </li>
  <li><b>GRASS_RENDER_PS_HEADER</b><br>
    if <code>FALSE</code>, the output is appended to any existing file,
    and no prolog or setup sections are generated.
  </li>
  <li><b>GRASS_RENDER_PS_TRAILER</b><br>
    if <code>FALSE</code>, no trailer section is generated.
  </li>
</ul>

<h3>Example</h3>

<div class="code"><pre>
export GRASS_RENDER_IMMEDIATE=ps
export GRASS_RENDER_TRUECOLOR=TRUE

g.region raster=elevation
d.rast elevation
d.vect roadsmajor color=red
</pre></div>
This writes a file named <code>map.ps</code> in your current directory.

<h2>NOTES</h2>

The resolution of the output files is defined by current region
extents. Use <code>g.region -p</code> to get the number of rows and cols
and use the environment variables to set the image size. If you would
like a larger image, multiply both rows and cols by the same whole
number to preserve the aspect ratio.

<p>GRASS_RENDER_TRUECOLOR requires either PostScript level 2 or level 1 plus the
colorimage and setrgbcolor operators (this is the case for colour
printers which pre-date level 2 PostScript).

<p>Masked images (<code>d.rast</code>, <code>d.rgb</code>, <code>d.his -n</code>)
require PostScript level 3.

<h2>SEE ALSO</h2>

<em>
  <a href="cairodriver.html">Cairo driver</a>,
  <a href="pngdriver.html">PNG driver</a>,
  <a href="htmldriver.html">HTML driver</a>,
  <a href="variables.html">variables</a>
</em>
<br><br>
<em>
  <a href="d.rast.html">d.rast</a>,
  <a href="d.vect.html">d.vect</a>,
  <a href="d.mon.html">d.mon</a>,
  <a href="d.erase.html">d.erase</a>,
  <a href="d.redraw.html">d.redraw</a>
</em>

<h2>AUTHOR</h2>

Glynn Clements, 2007