// declare and initialize variables int x = mouseX; int y = mouseY; float w = 50; float color1 = 50; float color2 = 50; float color3 = 50; float diam = 7; float ran = random(0,255); PImage wall; PFont font; //setup void setup() { frameRate (100); size (1000, 300); background (0); wall = loadImage("wall.jpg"); image (wall, 0, 20); stroke(255); line(5,5,5,30); stroke(255); line(50,5,50,30); stroke(255,255,255); font = loadFont("AppleGothic-24.vlw"); textFont(font, 12); text ("clear", 12, 20); } //draw void draw() { if (mousePressed){ ellipse(mouseX,mouseY,diam, diam); fill(color1,color2,color3,200); noStroke(); color1 = mouseX; color2 = mouseY; color3 = 100; diam = diam + .01; } //sets so drawing can't be above wall if (mouseY < 20){ fill(0,0,0,255); } //sets clear button if ((mouseX < 50) && (mouseY < 30) && (mousePressed)){ //font = loadFont("AppleGothic-24.vlw"); background (0); image (wall, 0, 20); stroke(255); line(5,5,5,30); stroke(255); line(50,5,50,30); fill(255); textFont (font, 12); text ("clear", 12, 20); } }