d.frame.html 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. <h2>DESCRIPTION</h2>
  2. <em>d.frame</em> manages display frames on the current user's graphics
  3. monitor. Graphics are displayed in rectangular frames on whatever
  4. graphics monitor the user is currently directing GRASS display output
  5. to (defined by <em><a href="d.mon.html">d.mon</a></em> module). These
  6. frames are created and managed with this module.
  7. <p>
  8. Note that GRASS frame contents <em>are not</em> retained when one
  9. frame covers another. You cannot shuffle frames from top to bottom and
  10. then back again. They simply define rectangular areas on the screen
  11. where subsequent drawing will occur.
  12. <h2>NOTES</h2>
  13. The coordinates for the <b>at</b> option are stated in the form
  14. <em>top,bottom,left,right</em> values are in percent. The upper-left
  15. corner of the graphics monitor always is at location 0,0 while the
  16. monitor's lower-right corner is always at 100,100.
  17. <p>
  18. If the user has created multiple display frames that overlap one another,
  19. whatever the user displays in the active frame will overwrite
  20. those portions of the underlying frame where these frames overlap.
  21. <h2>EXAMPLE</h2>
  22. <div class="code"><pre>
  23. # start a new graphics monitor, the data will be rendered to
  24. # /tmp/map.png image output file of size 600x540px
  25. d.mon cairo out=/tmp/map.png width=600 height=540 --o
  26. # set up region
  27. g.region raster=elevation
  28. # remove all frames and erase the current graphics monitor
  29. d.frame -e
  30. # create a first frame and display 'landuse96_28m' raster map including text label
  31. d.frame -c frame=first at=0,50,0,50
  32. d.rast landuse96_28m
  33. d.text text='Landuse' bgcolor=220:220:220 color=black size=6
  34. # create a second frame and display 'streams' vector map
  35. d.frame -c frame=second at=0,50,50,100
  36. d.vect streams color=blue
  37. d.text text='Streams' bgcolor=220:220:220 color=black size=6
  38. # create a third frame and display 'elevation' raster map including text label and scale
  39. d.frame -c frame=third at=50,100,0,50
  40. d.rast elevation
  41. d.text text='Elevation' bgcolor=220:220:220 color=black size=6
  42. d.barscale at=0,10 style=line bgcolor=none
  43. # create a fourth frame and display RGB composition map including text label
  44. d.frame -c frame=fourth at=50,100,50,100
  45. d.rgb red=lsat7_2002_30 green=lsat7_2002_20 blue=lsat7_2002_10
  46. d.text text='RGB true colors' bgcolor=220:220:220 color=black size=6
  47. # release the current graphics monitor
  48. d.mon -r
  49. </pre></div>
  50. <center>
  51. <img src="d_frame.png" alt="d.frame example"><br>
  52. <em>Figure: d.frame example</em>
  53. </center>
  54. <h2>SEE ALSO</h2>
  55. <em>
  56. <a href="d.erase.html">d.erase</a>,
  57. <a href="d.info.html">d.info</a>,
  58. <a href="d.mon.html">d.mon</a>,
  59. <a href="d.redraw.html">d.redraw</a>
  60. </em>
  61. <p>
  62. <a href="variables.html#list-of-selected-grass-environment-variables-for-rendering">GRASS environment variables for
  63. rendering</a> (GRASS_RENDER_FRAME)
  64. <h2>AUTHOR</h2>
  65. Martin Landa, Czech Technical University in Prague, Czech Republic
  66. <p>
  67. Based on <em>d.frame</em> from GRASS 6:<br>
  68. James Westervelt, U.S. Army Construction Engineering Research
  69. Laboratory<br>
  70. Michael Shapiro, U.S. Army Construction Engineering
  71. Research Laboratory
  72. <p>
  73. <i>Last changed: $Date$</i>