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 & HelpOther Libraries › clear area in which controlP5 controls are drawn
Page Index Toggle Pages: 1
clear area in which controlP5 controls are drawn (Read 1430 times)
clear area in which controlP5 controls are drawn
Apr 15th, 2010, 12:18pm
 
I have set aside a rectangle, like a toolbar, at the top of the drawing area in which I place some controlP5 sliders and labels. The actual drawing is done below this toolbar rectangle. But some times the drawing spills over into the toolbar area. How do I clear this area ?The usual method of filling the rectangle with a color does not work. Setting controlp5 autodraw as false also did not help.
Re: clear area in which controlP5 controls are drawn
Reply #1 - Apr 16th, 2010, 6:43pm
 
Sad, ok, to rephrase my question: How do I clear/erase/draw-on the background of the area in which controlp5 controls are drawn ?

Setting autodraw to false, filling the area with some color and manually drawing the controls (with controlP5.draw) did not help.
Re: clear area in which controlP5 controls are drawn
Reply #2 - Apr 17th, 2010, 4:17am
 
Add these two lines of code between drawing your scene and drawing the toolbar:

hint(DISABLE_DEPTH_TEST);
hint(ENABLE_DEPTH_TEST);
Re: clear area in which controlP5 controls are drawn
Reply #3 - Apr 18th, 2010, 3:13am
 
Thanks for the response. But I am not using 3D. In any case, the statements you mentioned did not help. May be I misunderstood how to use them.
Re: clear area in which controlP5 controls are drawn
Reply #4 - Apr 18th, 2010, 4:16am
 
I am sorry. It was all due to a mistake on my part. I had used a hexadecimal color  for fill() without knowing that you have to specify an alpha part when doing so.
Page Index Toggle Pages: 1