canvas as background?

Paul Gr pauls_postbus at hotmail.com
Tue Jan 23 15:58:36 UTC 2007


hello felix,
 
there are several way's to do this, but the easiest is probably the following:
 
- use two offscreen canvas objects: 'background' and 'scratch'
- prepare the background as you already did
 
then, inside the loop:
- copy 'background' to 'scratch'
- draw something on top of scratch
- wait for vertical retrace (WaitForVerticalBlank)
- copy scratch to screenIf the background image can be created efficiently (i.e. just a few lines or circles), then it is probalby more efficient to forget the background object and erase and redraw the complete scratch image straight away inside the loop...
 
best,
Paul
 
Paul Groot
Vrije Universiteit Amsterdam



> Date: Tue, 23 Jan 2007 11:07:06 +0100> From: Beamgau at gmx.de> Subject: canvas as background?> To: EPRIME at MAIL.TALKBANK.ORG> > hi everybody,> > i got a canvas, which i want to use as background. there a several coloured circles on it.> > now i want to have something like a foreground... i want to draw something on it, clear the foreground, draw and clear in a loop.> > the background should not be affected by this "loop". i tried to simply use one canvas for background, one for foreground, but this didn't work out...> > can someone tell me how to achieve this? > > thanks a lot> felix fischer> tu berlin> -- > "Feel free" - 10 GB Mailbox, 100 FreeSMS/Monat ...> Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail> 
_________________________________________________________________
Leef je uit: ontwerp je startpagina precies zoals jij het wil hebben op Live.nl.
http://www.live.com/getstarted
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.linguistlist.org/pipermail/eprime/attachments/20070123/d0a2ef66/attachment.htm>


More information about the Eprime mailing list