g.pnmcomp.html 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <h2>DESCRIPTION</h2>
  2. <em>g.pnmcomp</em> isn't meant for end users. It's an internal tool
  3. for use by <em><a href="wxGUI.html">wxGUI</a></em>.
  4. <p>
  5. In essence, <em>g.pnmcomp</em> generates a PPM image by overlaying a
  6. series of PPM/PGM pairs (PPM = RGB image, PGM = alpha channel).
  7. <h2>NOTES</h2>
  8. The intention is that <em>d.*</em> modules will emit PPM/PGM pairs (by
  9. way of the PNG-driver code being integrated into Display Library). The
  10. GUI will manage a set of layers; each layer consists of the data
  11. necessary to generate a PPM/PGM pair.
  12. Whenever the layer &quot;stack&quot; changes (by adding, removing,
  13. hiding, showing or re-ordering layers), the GUI will render any layers
  14. for which it doesn't already have the PPM/PGM pair, then re-run
  15. <em>g.pnmcomp</em> to generate the final image (just redoing the
  16. composition is a lot faster than redrawing everything).
  17. <p>
  18. A C/C++ GUI would either have <em>g.pnmcomp's</em> functionality
  19. (image composition) built-in, or would use the system's graphics API
  20. to perform composition (for translucent layers, you would need OpenGL
  21. or the Render extension, or something else which supports translucent
  22. rendering).
  23. <p>
  24. Tk doesn't support transparent (masked) true-colour images (it does
  25. support transparent GIFs, but that's limited to 256 colours), and an
  26. image composition routine in Tcl would be unacceptably slow, hence
  27. the existence of <em>g.pnmcomp</em>.
  28. <h2>SEE ALSO</h2>
  29. <em>
  30. <a href="g.cairocomp.html">g.cairocomp</a>
  31. </em>
  32. <h2>AUTHOR</h2>
  33. Glynn Clements