xxxxxxxxxx
function setup() {
createCanvas(600, 450);
background (250);
}
function draw() {
if (mouseIsPressed === true){
fill(0);
rect (15, 15, 570, 420);
} else {
fill (250);
}
/// change background color
noStroke();
fill(204, 204, 255);
rect (0, 0, 15, 450);
rect (0, 0, 600, 15);
rect (0, 435, 600, 15);
rect (585, 0, 15, 450);
/// shape of outline
fill (255, 192, 203);
circle(mouseX, mouseY, 20);
fill(143, 188, 139);
rect(mouseX, mouseY, 40, 20);
fill(123, 104, 238);
square(mouseX, mouseY, 20);
}
function keyPressed(){
if(key === 'p'){
print();
}
}