Skip to content

Commit

Permalink
slinky is the drawing program
Browse files Browse the repository at this point in the history
  • Loading branch information
captproton committed Apr 25, 2010
1 parent 13d9e5b commit 836f6d6
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions slinky/slinky.pde
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
int slinky = 25;

void setup() {
size(800,600);
background(255);
smooth();
}

void draw() {
slinkys(mouseX, mouseY, pmouseX, pmouseY);
}

void slinkys(int x, int y, int px, int py) {
if (mousePressed == true)
{
fill(0);
fill(255);
if(keyPressed)
if (key == 'r' || key == 'r')
fill(255,0,0);
if (key == 'c' || key == 'c')
fill(455);
if (key == 'g' || key == 'g')
fill(0,255,0);
if (key == 'b' || key == 'b')
fill(0,0,255);
if(mousePressed) {
ellipse(mouseX, mouseY, slinky, slinky);

if(key == '*' || key == '*') {
slinky = slinky+1;
}
else {

slinky = 25;
}
}
}

ellipse(x,y,45,45);
}

0 comments on commit 836f6d6

Please sign in to comment.