[wxruby-users] Black background using paint_buffered
Alex Fenton
alex at pressure.to
Wed Apr 23 06:34:34 EDT 2008
Andreas Warberg wrote:
> To avoid flickering during screen updates in a Frame on Windows I
> recently switched from
>
> paint do | dc |
> #...
> end
>
> to
>
> paint_buffered do | dc |
> #...
> end
>
> The background colour of the Frame is set to WHITE, which is respected
> under paint, but is replaced by BLACK under paint_buffered.
>
> The painting jobs seems fine, though all my black lines become invisible
> :P
>
> Is there something I can do to sort this out? Perhaps supply my own
> buffer...
>
Yes, you can pass your own buffer as an optional argument to
paint_buffered. It should be a Wx::Bitmap of the appropriate height and
width.
I will see if the ruby code that does paint_buffered could make the
bitmap background match the window's.
a
More information about the wxruby-users
mailing list