psdriver.html 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. <!-- meta page description: PostScript DISPLAY DRIVER -->
  2. <em>PS display driver</em> to create PostScript files.
  3. <h2>DESCRIPTION</h2>
  4. The PS driver generates a PostScript file from GRASS display commands.
  5. <h2>USAGE</h2>
  6. <h3>Environment variables</h3>
  7. The PS driver can be enabled by setting <b>GRASS_RENDER_IMMEDIATE</b>
  8. variable, eg.
  9. <div class="code"><pre>
  10. export GRASS_RENDER_IMMEDIATE=ps
  11. </pre></div>
  12. Several environment variables affect the operation of the PS driver:
  13. <ul>
  14. <li><b>GRASS_RENDER_WIDTH=xxx</b><br>
  15. the width of the image map (default is 640).
  16. </li>
  17. <li><b>GRASS_RENDER_HEIGHT=yyy</b><br>
  18. the height of the image map (default is 480).
  19. </li>
  20. <li><b>GRASS_RENDER_TRUECOLOR=[TRUE|FALSE]</b><br>
  21. sets true-color support. Default is FALSE.
  22. </li>
  23. <li><b>GRASS_RENDER_FILE</b><br>
  24. name of output file. If it ends with ".eps" an EPS file
  25. will be created.
  26. </li>
  27. <li><b>GRASS_RENDER_PS_PAPER</b><br>
  28. sets the screen dimensions and margins to
  29. fit a standard paper size, see also GRASS_RENDER_WIDTH, GRASS_RENDER_HEIGHT.
  30. </li>
  31. <li><b>GRASS_RENDER_PS_LANDSCAPE</b><br>
  32. if <tt>TRUE</tt>, the screen is rotated 90 degrees
  33. counter-clockwise so that a "landscape" screen fits better on
  34. "portrait" paper.
  35. </li>
  36. <li><b>GRASS_RENDER_PS_HEADER</b><br>
  37. if <tt>FALSE</tt>, the output is appended to any existing file,
  38. and no prolog or setup sections are generated.
  39. </li>
  40. <li><b>GRASS_RENDER_PS_TRAILER</b><br>
  41. if <tt>FALSE</tt>, no trailer section is generated.
  42. </li>
  43. </ul>
  44. <h3>Example</h3>
  45. <div class="code"><pre>
  46. export GRASS_RENDER_IMMEDIATE=ps
  47. export GRASS_RENDER_TRUECOLOR=TRUE
  48. g.region raster=elevation
  49. d.rast elevation
  50. d.vect roadsmajor color=red
  51. </pre></div>
  52. This writes a file named <tt>map.ps</tt> in your current directory.
  53. <h2>NOTES</h2>
  54. The resolution of the output files is defined by current region
  55. extents. Use <tt>g.region -p</tt> to get the number of rows and cols
  56. and use the environment variables to set the image size. If you would
  57. like a larger image, multiply both rows and cols by the same whole
  58. number to preserve the aspect ratio.
  59. <p>GRASS_RENDER_TRUECOLOR requires either PostScript level 2 or level 1 plus the
  60. colorimage and setrgbcolor operators (this is the case for colour
  61. printers which pre-date level 2 PostScript).
  62. <p>Masked images (<tt>d.rast</tt>, <tt>d.rgb</tt>, <tt>d.his -n</tt>)
  63. require PostScript level 3.
  64. <h2>SEE ALSO</h2>
  65. <em>
  66. <a href="cairodriver.html">Cairo driver</a>,
  67. <a href="pngdriver.html">PNG driver</a>,
  68. <a href="htmldriver.html">HTML driver</a>,
  69. <a href="variables.html">variables</a>
  70. <br><br>
  71. <a href="d.rast.html">d.rast</a>,
  72. <a href="d.vect.html">d.vect</a>,
  73. <a href="d.mon.html">d.mon</a>,
  74. <a href="d.erase.html">d.erase</a>,
  75. <a href="d.redraw.html">d.redraw</a>
  76. </em>
  77. <h2>AUTHOR</h2>
  78. Glynn Clements, 2007
  79. <p>
  80. <i>Last changed: $Date$</i>