[wxPython-users] Re: double buffering
Christopher Barker
Chris.Barker at noaa.gov
Fri Jan 26 08:56:26 PST 2007
Eli Golovinsky wrote:
> The reason for double buffering in my code wasn't to prevent flicker. It
> was to make sure the entire rect of the window is actually painted over
> with something and the easiest (though maybe not the fastest) way to do
> that is create an EmptyBitmap the size of the window, draw on it and
> Blit it to the screen.
Another reason to Double buffer is to keep form having to re-draw
everything every time the window needs updating. To accomplish that, you
need to keep the bitmap around, and only re-draw it when it needs to
change. Your Paint handler then only needs to blit the bitmap to the screen.
see:
http://wiki.wxpython.org/index.cgi/DoubleBufferedDrawing
-Chris
--
Christopher Barker, Ph.D.
Oceanographer
Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Chris.Barker at noaa.gov
More information about the wxpython-users
mailing list