[wxPython-users] buffered dc
Robin Dunn
robin at alldunn.com
Thu Jul 13 10:01:48 PDT 2006
Gabriel Murray wrote:
> In my GUI, I have a BufferedPaintDC with some lines drawn on it which
> updates whenever a user presses a certain button. One thing I've noticed
> is that even when this window with the DC is just minimized and then
> maximized again, it always takes 1 to 2 seconds for the drawn lines to
> re-appear. It is just a grey background in the interim. Is there any way
> to prevent this from happening? It doesn't seem to stem from the code
> because nothing is being processed. It's just that the window is being
> brought to the foreground again.
Are you doing anything in the EVT_SIZE handler? (Like recreating the
buffer and redrawing the lines into it?)
Are you redrawing everything into the buffer again in the EVT_PAINT
handler, or are you saving the buffer and only drawing the buffer to the
window?
I experimented with the doodle sample with several thousand line
segments and I never saw a delay longer than about a quarter second when
restoring from minimized, switching to maximized, and back to unmaximized.
--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!
More information about the wxpython-users
mailing list