void setup(){ size (400,400); background (0,0,0); frameRate(30); //white paint bucket fill(255,255,255); rect(0,0,30,30); //light blue paint bucket fill(70,120,155); rect(0,30,30,30); //orange paint bucket fill(220,120,55); rect(0,60,30,30); //brown paint bucket fill(180,120,77); rect(0,90,30,30); //ugly green paint bucket fill(90,100,60); rect(0,120,30,30); //dark gray paint bucket fill(50,50,50); rect(0,150,30,30); //light gray paint bucket fill(100,100,100); rect(0,180,30,30); //pink paint bucket fill(256,0,60); rect(0,210,30,30); //chartreuse bucket fill(200,255,0); rect(0,240,30,30); //chartreuse bucket fill(180,60,190); rect(0,270,30,30); } boolean miss_on_off = false; color miss_paint_color = 255; char miss_stroke_weight = 3; void mouseReleased() { if(mouseX < 30){ miss_paint_color = get(mouseX,mouseY); fill(miss_paint_color); }else{ if(miss_on_off == false) { miss_on_off = true; }else{ miss_on_off = false; } } } void draw(){ if (miss_on_off == true){ if (mouseX > 35){ //paint with circles //ellipse (mouseX,mouseY,10,10); //paint with circles that change sizes float speed = abs(mouseX-pmouseX) + abs(mouseY-pmouseY); ellipse(mouseX, mouseY, speed, speed); //paint with slashes //strokeWeight(miss_stroke_weight); //line(mouseX-3,mouseY+3,mouseX+3,mouseY-3); //stroke(miss_paint_color); //paint with continuouse lines //stroke(miss_paint_color); //line(mouseX, mouseY, pmouseX, pmouseY); } } }