in reply to Re: Refreshing text without flicker with AddLabel using Win32::GUI
in thread Refreshing text without flicker with AddLabel using Win32::GUI
Second, there is a noflicker option to Win32::GUI::Window->new, which for some reason defaults to 0.
I was curious, so I investigated.
When this option is off, window updates are performed as follows:
- The part of the window that needs to be redrawn (or more) is redrawn.
When this option is on, window updates are performed as follows:
- A canvas (Device Context) is created.
- A bitmap is allocated for the canvas.
- The bitmap is initialized to the background colour.
- The whole window (and child windows) is painted onto this canvas.
- The bitmap is copied over the window's bitmap.
- The bitmap is deallocated.
- The canvas is deallocated.
Think of it as buffering the output so that all the changes to the window's pixels occurs as close to instantly as possible.
The latter takes longer to update the window, uses more resources and is probably rarely needed.
|
---|
In Section
Seekers of Perl Wisdom