[wxruby-users] paint_buffered
Alex Fenton
alex at pressure.to
Mon Nov 3 12:51:26 EST 2008
Anton Hörnquist wrote:
> In order to reduce flicker in my paint-intense app I've switched from
> paint |dc| to paint_buffered |dc|. Unfortunately, there is no difference
> after switching. Does anyone know why? Are there any other workarounds
> for this?
>
> I'm on winxp, ruby 1.8.4, wxruby 1.9.9 (i've tried wxruby 1.9.8 but the
> result is the same)
>
Avoiding flicker in GUI apps is unfortunately not as easy as using
paint_buffered, although it helps in a lot of cases.
It would be good to see some code that we can actually run, and more
information about the app - eg is the refreshing event-driven (the user
doees something, the display changes) or time-driven? To what extent can
future drawing be predicted? Is the drawing itself complex, or is there
a lot of computationally intensive non-drawing code in paint? Does
everything change at once?
Depending on this different things might help - eg preparing drawing in
idle time, only updating voided parts of the canvas, etc
alex
More information about the wxruby-users
mailing list