import processing.core.*; 
import processing.data.*; 
import processing.event.*; 
import processing.opengl.*; 

import java.util.HashMap; 
import java.util.ArrayList; 
import java.io.File; 
import java.io.BufferedReader; 
import java.io.PrintWriter; 
import java.io.InputStream; 
import java.io.OutputStream; 
import java.io.IOException; 

public class Nappkin extends PApplet {

PImage bg;

public void setup()
{
  
  background(255);
  bg = loadImage("bg.png");
}

public void draw()
{
  image(bg, 0, 550, width, height/12);
  
  if(mousePressed && mouseButton == LEFT)
  {
    stroke(0);
    line(pmouseX, pmouseY, mouseX, mouseY);
    
    if(mouseX > 570 && mouseY > 570)
    {
      link("www.paulharden.net");
    }
  }
  else if(mousePressed && mouseButton == RIGHT)
  {
    background(255);
  }
}
  public void settings() {  size(600,600); }
  static public void main(String[] passedArgs) {
    String[] appletArgs = new String[] { "Nappkin" };
    if (passedArgs != null) {
      PApplet.main(concat(appletArgs, passedArgs));
    } else {
      PApplet.main(appletArgs);
    }
  }
}
