int xq1 = mouseX; int yq1 = mouseY; int xq2 = width - mouseX; int yq2 = mouseY; int xq3 = mouseX; int yq3 = height - mouseY; int xq4 = width - mouseX; int yq4 = height - mouseY; int rColor = 255; int rWeight = 0; int rAlpha = 0; PImage bClose; void setup () { size(400, 420); background(255); smooth(); bClose = loadImage("x.png"); } void draw() { cursorSelect(); rColor = int(random(0, 255)); rWeight = int(random(1, 10)); rAlpha = int(random(50, 100)); point(xq1, yq1); point(xq2, yq2); point(xq3, yq3); point(xq4, yq4); menu(); } void menu() { noStroke(); fill(230); rect(0, height- 20, width, abs(20-height)); image(bClose, 2, height - 18); } void mouseDragged () { // createDots(); stroke(rColor, rAlpha); strokeWeight(rWeight); xq1 = mouseX; yq1 = mouseY; xq2 = width - mouseX; yq2 = mouseY; xq3 = mouseX; yq3 = height - mouseY; xq4 = width - mouseX; yq4 = height - mouseY; } void mouseClicked() { if ( mouseX > 2 && mouseX < 19 && mouseY > (height - 19) && mouseY < (height - 2) ) { noStroke(); fill(255); rect(0,0,width,height-20); } } void cursorSelect() { if (mouseY < height - 20) { cursor(CROSS); createDots(); } else { cursor(ARROW); } } void createDots() { }