float lineWidth = 3;
void setup ()
{
size (800,600);
background (255);
noStroke();
fill (168,28,28); //red box
rect (700,0,100,100);
fill(102,51,0); //brown box
rect(700,100,100,100);
fill(0); //black box
rect(700,200,100,100);
fill(255,242,225); //tan box
rect(700,300,100,100);
fill(255,193,20); //gold box
rect(700,400,100,100);
fill(153,204,225); //blue sky
rect(60,10,620,250);
fill(102); //gray
rect(60,260,620,675);
fill(180); //gray behind head
rect (300,120,75,150); // x, y, size
fill(180); //gray behind head 2
rect (400,80,55,150); // x, y, size
fill(180); //gray behind head 3
rect (480,120,55,150); // x, y, size
fill(180); //gray 4
rect (550,70,66,220); // x, y, size
fill(180); //gray 2
rect (630,160,50,150); // x, y, size
fill(255,242,225); //fill pale
ellipse(width/2,height/2,200,250); //circle center, x by y
fill(255); // left eye
ellipse(363,270,40,45);
fill(255); //right eye
ellipse(433,270,40,45);
fill(180); //gray 1
rect (60,150,60,150); // x, y, size
fill(180); //gray 2
rect (150,160,50,150); // x, y, size
fill(180); //gray 3
rect (220,140,60,150); // x, y, size
fill(0); //shirt
rect (320,460,150,140); // x, y, size
}
void draw(){
//red
if (mousePressed && mouseX>=700 &&mouseY<=100) {
stroke(168,28,28); }
//brown
if(mousePressed && mouseX>=700 && mouseY<=200 && mouseY >=100) {
stroke (102,51,0);}
//black
if(mousePressed && mouseX>=700 && mouseY<=300 && mouseY >=200) {
stroke (0);}
//tan
if(mousePressed && mouseX>=700 && mouseY<=400 && mouseY >=300) {
stroke (255,242,225);}
//gold
if(mousePressed && mouseX>=700 && mouseY<=500 && mouseY >=400) {
stroke (255,193,20);}
strokeWeight(lineWidth);
if (mousePressed && mouseButton == LEFT){
line(mouseX,mouseY,pmouseX,pmouseY); } //draw
}
void keyPressed (){
if (key == '+'){
lineWidth ++; }
if (key== '-'){
lineWidth --; }
if(lineWidth <=0){
lineWidth=1; }
if (key == ' ')
{
background (255);
noStroke();
fill (168,28,28); //red box
rect (700,0,100,100);
fill(102,51,0); //brown box
rect(700,100,100,100);
fill(0); //black box
rect(700,200,100,100);
fill(255,242,225); //tan box
rect(700,300,100,100);
fill(255,193,20); //gold box
rect(700,400,100,100);
fill(153,204,225); //blue sky
rect(60,10,620,250);
fill(102); //gray
rect(60,260,620,675);
fill(180); //gray behind head
rect (300,120,75,150); // x, y, size
fill(180); //gray behind head 2
rect (400,80,55,150); // x, y, size
fill(180); //gray behind head 3
rect (480,120,55,150); // x, y, size
fill(180); //gray 4
rect (550,70,66,220); // x, y, size
fill(180); //gray 2
rect (630,160,50,150); // x, y, size
fill(255,242,225); //fill pale
ellipse(width/2,height/2,200,250); //circle center, x by y
fill(255); // left eye
ellipse(363,270,40,45);
fill(255); //right eye
ellipse(433,270,40,45);
fill(180); //gray 1
rect (60,150,60,150); // x, y, size
fill(180); //gray 2
rect (150,160,50,150); // x, y, size
fill(180); //gray 3
rect (220,140,60,150); // x, y, size
fill(0); //shirt
rect (320,460,150,140); // x, y, size
}
}