/* @pjs preload="http://www.freestyle.mvla.net/~chelseaw/project8/scripts/paper-texture-instructions.png"; */ PImage img, bg; void setup() { size(500,500); frameRate(100); img = loadImage("http://www.freestyle.mvla.net/~chelseaw/project8/scripts/paper-texture-instructions.png"); image(img,0,0); bg = loadImage("http://www.freestyle.mvla.net/~ChelseaW/project8/scripts/paper-texture-instructions2.png"); } void draw() { if (mousePressed && (mouseButton == LEFT)) { ellipse(mouseX,mouseY,20,20); stroke(0); fill(0); } if (mousePressed && (mouseButton == RIGHT)) { rect(mouseX,mouseY,30,30); fill(255); stroke(255); } if (keyPressed && (key == 'r' || key == 'R')) { background(bg); } if (keyPressed && (key == 't' || key == 'T')) { background(255); } if (keyPressed && (key == 's' || key == 'S')) { saveFrame("prettyPicture##.jpg"); } }