"""
This is a subclass of wxBufferedDC which can be used inside of an
OnPaint() event handler. Just create an object of this class instead
of wxPaintDC and that's all you have to do to (mostly) avoid flicker.
"""
I'm wondering in which circumstances both wx.BufferedDC and wx.BufferedPaintDC
can cause flickering. As a matter of fact, I rely heavily in
wx.BufferedPaintDC for alpha-blended controls, and the flicker is
quite evident, to the point where it doesn't seem to work. Is not
supplying a manual buffer the cause of this?
I'm wondering in which circumstances both wx.BufferedDC and
wx.BufferedPaintDC can cause flickering. As a matter of fact,
I rely heavily in wx.BufferedPaintDC for alpha-blended
controls, and the flicker is quite evident, to the point
where it doesn't seem to work. Is not supplying a manual
buffer the cause of this?
"""
This is a subclass of wxBufferedDC which can be used inside of an
OnPaint() event handler. Just create an object of this class instead
of wxPaintDC and that's all you have to do to (mostly) avoid flicker.
"""
I'm wondering in which circumstances both wx.BufferedDC and wx.BufferedPaintDC
can cause flickering. As a matter of fact, I rely heavily in
wx.BufferedPaintDC for alpha-blended controls, and the flicker is
quite evident, to the point where it doesn't seem to work. Is not
supplying a manual buffer the cause of this?
Flicker happens when drawing is done to the screen in multiple discreet steps, but that is what using a buffer is supposed to prevent. The only thing drawn to the screen is the buffer bitmap and it is done in a single step, so you need to look for the source of your flicker elsewhere. My guess is that it is probably happening in the EVT_ERASE_BACKGROUND event, but since you are drawing the whole window via the buffer you can safely catch EVT_ERASE_BACKGROUND and do nothing in the handler.
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!