FAQ
 
 
Cover  \ Exhibition  \ Learning  \ Reference  \ Download  \ Discourse   
    Examples \ Tutorials \ Courses & Workshops
 
   
 
 
Examples for Processing (BETA) version 91+. If you have a previous version, use the examples included with your software. If you see any errors or have comments, please let us know.



Click
by REAS <http://reas.com>

Move the mouse to position the shape. Press the mouse button to invert the color.

Updated 21 August 2002

   
// Click 
// by REAS <http://reas.com> 

int size = 30; 
 
void setup() { 
  size(200, 200); 
  ellipseMode(CENTER); 
  fill(126); 
  noStroke(); 
  rect(0, 0, width, height); 
} 
 
void draw() { 
  if(mousePressed) { 
    stroke(255); 
  } else { 
    stroke(51); 
  } 
  line(mouseX-30, mouseY, mouseX+30, mouseY); 
  line(mouseX, mouseY-30, mouseX, mouseY+30); 
} 
 







   
  Processing is an open project initiated by Ben Fry and Casey Reas  
  © Info