Re: Needing some Windows programming help

new topic     » goto parent     » topic index » view thread      » older message » newer message

Dan Moyer wrote:
> I think the idea behind CChris' suggestion is that any write from Euphoria 
> directly to the screen will take a longer time to complete than the time
> it takes to bitBlt() the (finished) pixmap to the screen; therefore, while
> you're writing the data to the pixmap, although it takes some time, the
> screen stays the same, ergo, no flicker.  When your program is finished
> writing to the pixmap, then the subsequent bitBlt() happens sufficiently 
> quickly that *that action* shows no flicker.
> 
> Of course, I could be wrong :)
> 
Hmmm, just to dot the i's and cross the t's:
It depends. For example, to draw a bevelled border, the usual trick involves
drawing a black block, then a white block at +1, then a grey at +2, then fill
with whatever. While just as fast, it looks awful direct-to-screen, hence the
buffer idea. My first point is that it has *nothing* to do with Euphoria and the
same trick is used in (eg) C++. My second point is that it is perfectly possible
to avoid flicker when using direct-to-screen, and will (in some but not all
cases) be fractionally faster, but in general far harder to code. If you look at
a typical button, it can be drawn in 4 or 5 bitBlts buffer-style (hence faster),
but would need 9 or 10 direct-flicker-free. Conversely raw text is 100% faster
drawn direct, done in 1 not 2.
KISS principle says use a buffer.

Regards,
Pete

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu