Next: Colour Up: Using DrawingAreas in Practice Previous: draw_input.c - Input to a DrawingArea

draw_input2.c - drawing to a pixmap

One problem the draw_input.c program has is that if the window was covered and then exposed the picture would not redraw itself.

Indeed since it is an interactive process it would be very difficult to redraw the picture unless we used Pixmaps to store the drawing data and then map a pixmap to the window.

When an expose event is detected all we need to do is remap the pixmap to the window.

The draw_input2.c program does exactly the same task as draw_input.c but draws to a pixmap which can be remapped to the window upon an exposure.

The major differences between the programs are:
Tue May 24 16:52:56 BST 1994