[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [paragui-users] re: eventDraw vs eventBlit
From: |
Alexander Pipelka |
Subject: |
Re: [paragui-users] re: eventDraw vs eventBlit |
Date: |
05 Jul 2002 19:31:47 +0200 |
Am Fre, 2002-07-05 um 19.03 schrieb Keith Swyer:
> ok, didn't see that in the DOC till just now..... anyway, maybe i should
> explain myself a little more. i'm working on a widget that is a piano
> keyboard. on a note on event, i highlight the key in the widget and on note
> off i unhighlight that key. but i'm confused as to what do to, use eventDraw
> with a widget surface or just eventBlit. is one faster than the other...i'm
> assuming the blit is. and why would you ever use the draw if you can just use
> a blit? i understand that the draw is sort of saving to the widget surface.
> correct? so am i right in saying that the draw is not called on a blit unless
> specified and thus would result in faster blitting rather than redrawing the
> entire surface again? phewf, hope i didn't get lost there.....i'm just
> looking for the best way to get this keyboard showing a keypress as fast as
> possible. right now i'm only using the eventDraw for everything, but i think
> i'd be better to use a combination of both correct? draw the main keyboard
> and blit the highlights? anyway, this was a widget i made a while ago and
> now am finally using .
>
One more reply :))
If you want to display something like piano keys you also could use
PG_Image. I guess there are only a few different bitmaps for the keys.
Use PG_Image and override eventBlit().
You will benefit from the surfacecache (image) and won't waste memory
(eventBlit).
Alex