[wxruby-users] Tearing in my buffered animation test script...

Mario Steele
Sat, 01 Dec 2007 13:47:55 -0000

On 12/1/07, Mario Steele <mario at ruby-im.net> wrote:

>
> Two other things.
> 1.) If your doing the actual painting when evt_paint() is called, then you
> do not need to create a ClientDC  (Which is what window.paint does)
> 2.) You can skip evt_paint() and window.refresh /window.update all
> together, and just call window.paint, to paint to the window, when your
> finished with the painting on the Buffer.
>
> Just a couple of suggestions for ya, which should take care of the flicker
> and tearing.
>
> Mario Steele
>


Just a quick follow up.  What I meant to say, was that you need to use one,
or the other, as your basically creating two DC''s within a single
event,
which would be causing the flicker.  So, you need to either create a Thread
to draw it, or you need to take out the paint and draw within the
evt_paint() proc.  Sorry if that didn''t make sense earlier. ;-)
-------------- next part --------------
An HTML attachment was scrubbed...