psdriver.html 3.6 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> - driver to create PostScript files.
  12. <BR><EM>(drivers)</EM>
  13. <H2>DESCRIPTION</H2>
  14. The PS driver generates a PostScript file from GRASS display commands.
  15. The driver is started as 'pseudo' monitor (PS file instead) and when
  16. stopped, all output from previously used display commands are written
  17. to the PostScript file.
  18. <H2>USAGE</H2>
  19. <H3>Environment variables</H3>
  20. Several environment variables effect the operation
  21. of the PS driver:
  22. <UL>
  23. <LI><B>GRASS_RENDER_IMMEDIATE=[FALSE|TRUE|PNG|PS|HTML|cairo]</B><BR>
  24. tells the raster library which driver to use. If
  25. <tt>TRUE</tt>, the cairo driver is used if it is enabled, otherwise the PNG driver is used.
  26. <LI><B>GRASS_PSFILE</B><BR>
  27. name of output file. If it ends with ".eps" an EPS file
  28. will be created.</LI>
  29. <LI><B>GRASS_PAPER</B><BR>
  30. sets the screen dimensions and margins to
  31. fit a standard paper size, see also GRASS_WIDTH, GRASS_HEIGHT.</LI>
  32. <LI><B>GRASS_WIDTH</B><BR>
  33. defines the width of the screen, see also GRASS_HEIGHT</LI>
  34. <LI><B>GRASS_HEIGHT</B><BR>
  35. defines the height of the screen, see also GRASS_WIDTH</LI>
  36. <LI><B>GRASS_TRUECOLOR</B><BR>
  37. if <tt>TRUE</tt>, the PS driver generates color output, otherwise
  38. monochrome.</LI>
  39. <LI><B>GRASS_LANDSCAPE</B><BR>
  40. if <tt>TRUE</tt>, the screen is rotated 90 degrees
  41. counter-clockwise so that a "landscape" screen fits better on
  42. "portrait" paper.</LI>
  43. <LI><B>GRASS_PS_HEADER</B><BR>
  44. if <tt>FALSE</tt>, the output is appended to any existing file,
  45. and no prolog or setup sections are generated.</LI>
  46. <LI><B>GRASS_PS_TRAILER</B><BR>
  47. if <tt>FALSE</tt>, no trailer section is generated.</LI>
  48. <LI><B>GRASS_LINE_WIDTH</B><BR>
  49. the default line width.
  50. </LI>
  51. <LI><B>GRASS_TEXT_SIZE</B><BR>
  52. the default text size.
  53. </LI>
  54. <LI><B>GRASS_FRAME</B><BR>
  55. contains 4 coordinates, <em>top,bottom,left,right</em>, defining the initial frame.
  56. </LI>
  57. </UL>
  58. <H3>Example</H3>
  59. <DIV class="code"><PRE>
  60. # Define driver settings (here: bash shell syntax)
  61. export GRASS_RENDER_IMMEDIATE=PS
  62. export GRASS_TRUECOLOR=TRUE
  63. # Display raster map and vector polygons
  64. d.rast <i>somerastermap</i>
  65. d.vect <i>somevectormap</i> color=red
  66. </PRE></DIV>
  67. This writes a file named <tt>map.ps</tt> in your current directory.
  68. <H2>NOTES</H2>
  69. The resolution of the <i>PS</i> raster map is defined by the map
  70. extents. Use <em>g.region -p</em> to get the number of rows and cols and
  71. use the environment variables to set the PS size. If you would like a
  72. larger image, multiply both rows and cols by the same whole number to
  73. preserve the aspect ratio.
  74. <P>
  75. GRASS_TRUECOLOR requires either PostScript level 2 or level 1 plus the
  76. colorimage and setrgbcolor operators (this is the case for colour printers
  77. which pre-date level 2 PostScript).
  78. <p>
  79. Only masked images (<tt>d.rast -o</tt>, <tt>d.rgb -o</tt>, <tt>d.his
  80. -n</tt>) require PostScript level 3.
  81. <h2>SEE ALSO</h2>
  82. <EM>
  83. <a href="displaydrivers.html">Display drivers</a>
  84. <br>
  85. <A HREF="cairodriver.html">CAIRO driver</A>,
  86. <A HREF="pngdriver.html">PNG driver</A>
  87. <BR>
  88. <A href="d.rast.html">d.rast</A>,
  89. <A href="d.vect.html">d.vect</A>
  90. </EM>
  91. <H2>AUTHOR</H2>
  92. Glynn Clements, 2007
  93. <p>
  94. <i>Last changed: $Date: 2008-03-23 14:34:53 +0000 (Sun, 23 Mar 2008) $</i>