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