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 › Draw Single Ellipse
Page Index Toggle Pages: 1
Draw Single Ellipse (Read 602 times)
Draw Single Ellipse
Apr 5th, 2010, 2:09pm
 
Hi All,

I have the following code:

Code:
boolean paused = true;

void setup()
{
size(400,400);
background(255);
strokeWeight(2);
smooth();
}

void draw()
{
stroke(random(255), random(255), random(255));
ellipse(random(0,width),random(0,height),4,4);
}

void keyPressed()
{
paused = !paused;
if(paused)
noLoop();
else
loop();
}


I had thought this would draw a single ellipse, but it does not. How can I get it to do this?

Should processing not draw a single ellipse as standard?

Thanks in advance
Dave
Re: Draw Single Ellipse
Reply #1 - Apr 5th, 2010, 2:54pm
 
looks like you should add background(255) to draw.
Page Index Toggle Pages: 1