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 › How do you remove objects
Page Index Toggle Pages: 1
How do you remove objects? (Read 741 times)
How do you remove objects?
Jan 15th, 2009, 10:34pm
 
How do you remove objects from the Canvas?  I looked for a .remove() method, but couldn't find anything of any help.  You guys have any ideas?
Re: How do you remove objects?
Reply #1 - Jan 15th, 2009, 10:46pm
 
Perhaps a stupid answer, but draw something over it? Or redraw everything except said object.
Re: How do you remove objects?
Reply #2 - Jan 15th, 2009, 10:54pm
 
I think the latter is the most common.

Are you using background() at the beginning of the loop? I've seen some forgetting to do that.
Re: How do you remove objects?
Reply #3 - Jan 17th, 2009, 4:48am
 
As was said, drawing over objects will erase their presence on screen.

If you are also concerned about cleaning up the data structures that did the drawing in the first place, a good place to learn is the particle examples.

Good luck in your processing!
Re: How do you remove objects?
Reply #4 - Jan 17th, 2009, 10:38pm
 
Awesome that answered my question.  Thanks a bunch!
Page Index Toggle Pages: 1