/** * Leie: * schuif met de cursor over het beeldvlak en ontdek de kleuren.

Keer terug */ PImage img; PImage img2; void setup() { size(988, 676); img = loadImage("leie.jpg"); image(img,0,0); noStroke(); img2 = loadImage("leie_pixel.png"); } void draw() { color d = get(mouseX, mouseY); stroke(51,102,153); fill(d,5); rect(468,208,52,156); int ix = int(random(img2.width)); int iy = int(random(img2.height)); color c = img2.get(ix, iy); noStroke(); fill(c, 90); int xgrid = int(random(-0)) * 26; int ygrid = int(random(-2, 60)) * 26; rect(xgrid, ygrid, 468, 26); noStroke(); //zwart kader buitenste - 1 px fill(0); rect(0,0,1,676); noStroke(); fill(0); rect(0,0,988,1); noStroke(); fill(0); rect(987,0,1,676); noStroke(); fill(0); rect(0,675,988,1); }