The bug report highlights a GTK+ 2.6 bug (in my opinion) - GTK should
redraw a widgets background after each expose event, it does for 2.4 but
forgets to do it for 2.6.
It looks like the gdk.Pixmap was used to solve the screen flicker
problem. However, if you arrange for all drawing to go through the
expose_event function (instead of a custom 'draw' function), GTK should
ensure there is no flicker (at least thats what the
gtk_widget_set_double_buffered documentation suggests).
But using a Pixmap has the advantage that you can quickly redraw a part
of the window that has been obscured and then exposed without needing to
redraw the entire Figure.
Send instant messages to your online friends http://au.messenger.yahoo.com
On Fri, 2005-06-03 at 08:00 -0500, John Hunter wrote:
> Why do we have self.set_double_buffered(False)? Its been
> that way for as long as I can remember, I think John wrote
> the original code, he may remember the actual reasons.
The original motivation can be found in this thread
The basic idea, if I recall correctly, was that since I was already
drawing to a pixmap, I was duplicating some effort by turning on
double buffering. Perhaps this reasoning wasn't correct, since we
were clearly doing something wrong as evidenced by the bug report that
started this discussion.