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.
Page Index Toggle Pages: 1
color (Read 510 times)
color
Oct 22nd, 2007, 11:31am
 
Hello, I would like to ask is, I do a page, the page background color is red. This page has a button, click on this button can be connected to a picture when I use the "rect" statement will be displayed images is eliminated, the pictures displayed in the background color also places together been eliminated, I have to add the background color, but the background color of the original button covers. I would like to ask how it can show pictures of a place with the background color? the premise is not overwrite the original button! I have another question is how and background music? ? Thank you!
Re: color
Reply #1 - Oct 22nd, 2007, 12:39pm
 
first, don't double post!

to erase parts of the window ("page") you have to use rect() with the fill color being your background color:

background( 0 ); // whole window is black now ..

fill(255); // white
noStroke(); // no outline
rect( 0, 0, width, height/2 );  // clear upper half of the window

does this answer your question?

F
Page Index Toggle Pages: 1