How to clear CANVAS in sunview
Ellery Chan
ellery at trantor.harris-atd.com
Fri May 12 14:12:29 AEST 1989
The easiest way that I know to clear a canvas is:
pw_writebackground (canvas_pixwin(canvas), 0, 0, width, height, PIX_SRC);
or, for color canvases:
pw_writebackground (canvas_pixwin(canvas), 0, 0, width, height,
PIX_SRC | PIX_COLOR(bg_color));
You only need to supply your own repaint procedure if you want to refresh
the display manually when previously covered parts of your canvas become
exposed. If CANVAS_RETAINED is set to TRUE, the canvas is repainted
automatically from a backing pixrect kept in memory. I hope this helps.
Ellery Chan | ARPA : ellery at trantor.harris-atd.com
Harris Corp., MS 3A-1912 | USENET: ...!uunet!x102a!trantor!ellery
PO Box 37, Melbourne, FL 32902 | AT&T : (407) 729-3364
More information about the Comp.sys.sun
mailing list