psdriver.html 3.1 KB

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