Title: Processing Pen Tool Simple Author: BrokenStylus Pastebin link: http://pastebin.com/rqfS3XDN First Edit: Saturday 14th of September 2013 10:15:26 PM CDT Last Edit: Saturday 14th of September 2013 10:15:26 PM CDT //Processing Draw Tool (black and white)   //COPYPASTA BELOW INTO PROCESSING WINDOW AND CLICK THE PLAY BUTTON   /*Instructions Wait a few seconds after hitting the play button Left click Black Pen Right click Eraser */   int paletteBlack = 0; int paletteWhite = 255; void setup() {   size(displayWidth, displayHeight);   smooth(4);   background(255);   ellipseMode(CENTER); }   void draw() {   if (mousePressed && (mouseButton == LEFT)) {     stroke(paletteBlack);     strokeWeight(10);     fill(paletteBlack);     line(mouseX, mouseY, pmouseX, pmouseY);   }     else if (mousePressed && (mouseButton == RIGHT)) {     stroke(paletteWhite);     strokeWeight(20);     fill(paletteWhite);     line(mouseX, mouseY, pmouseX, pmouseY);   }   else {     noFill();     noStroke();   } }