How to avoid flicker when resizing Composite or canvas? [message #463916] |
Tue, 15 November 2005 12:31  |
Eclipse User |
|
|
|
Using google we found a lot of topics about "flicker" but not this
specific one.
We are familiar with and use the double buffered technique to prepare an
off screen image. We use a PaintListener's paintControl method to draw
the image into an composite or canvas on the screen.
We can't seem to avoid flicker. It seems the target composite or canvas
gets repainted to its background color before we draw our off screen image
onto it, somewhat defeating the purpose of double buffering.
Can anyone advise possible remedies?
In the Win32 world, I recall we used "Invalidate" or "InvalidateRect" GDI
functions to tell the system the screen or part of it needed updating.
There was a parameter that allowed us to erase everything or not. Do we
have the equivalent of that with SWT?
|
|
|
|
Re: How to avoid flicker when resizing Composite or canvas? [message #463928 is a reply to message #463920] |
Tue, 15 November 2005 13:30  |
Eclipse User |
|
|
|
Thank you for the informative and speedy reply, Veronika.
BTW, we were frustrated with Win32 bugs underlying SWT's Table. We made a
Grid control that handles 2*32 rows or columns, lets us put any size
images or text in it, is super fast, and now thanks to you, is
flicker-free.
We started out wanting to make it compatible with the SWT Plus initiative
and let it be a drop-in replacement for Table. But that would mean using
the TableItem and TableColumn classes, plus we wanted rich features that
it could not support.
|
|
|
Powered by
FUDForum. Page generated in 0.05622 seconds