🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.sun
Article #12813

Re: How to clear CANVAS in sunview

#12813
From: Ellery Chan
Date: Fri, 12 May 1989 04:12
17 lines
1313 bytes
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@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
Technical Details
Message-ID: <8905091809.AA29087@trantor.harris-atd.com>
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!uw-beaver!rice!sun-spots-request

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!uw-beaver!rice!sun-spots-request
From: ellery@trantor.harris-atd.com (Ellery Chan)
Newsgroups: comp.sys.sun
Subject: Re: How to clear CANVAS in sunview
Keywords: Windows
Message-ID: <8905091809.AA29087@trantor.harris-atd.com>
Date: 12 May 89 04:12:29 GMT
Sender: usenet@rice.edu
Organization: Sun-Spots
Lines: 17
Approved: Sun-Spots@rice.edu
Original-Date: Tue, 9 May 89 14:09:50 EDT
X-Sun-Spots-Digest: Volume 7, Issue 285, message 3 of 10