We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSyntax Questions › Redrawing rather than addition
Page Index Toggle Pages: 1
Redrawing rather than addition (Read 373 times)
Redrawing rather than addition
Dec 6th, 2007, 10:26am
 
hi, if i draw a rectangle at position x, and increase x over time (or by pressing a key), it seems to keep adding a new rectangle at each new x, rather than redrawing it so you can't see the original... i didn't have this problem before but i'm not sure what i'm doing differently. cheers.
Re: Redrawing rather than addition
Reply #1 - Dec 6th, 2007, 10:37am
 
seems to me that you miss a call to background( .. ) in your mainloop. it clears up the color buffer each frame
Re: Redrawing rather than addition
Reply #2 - Dec 6th, 2007, 10:38am
 
cheers, i knew i was being stupid Smiley
Page Index Toggle Pages: 1