/**
 * 
 */
package com.onearmedman.processing;

import java.awt.event.MouseEvent;

import processing.core.*;

/**
 * @author edwards
 *
 */
public class ProcessingTest extends PApplet {
	PImage img;

	/**
	 * 
	 */
	private static final long serialVersionUID = -1103479701905449281L;

	/**
	 * 
	 */
	public ProcessingTest() {
		// TODO Auto-generated constructor stub
	}

	public void setup() {
		String imgName = this.selectInput();
		this.img = this.requestImage(imgName,"jpg");
		size(400,400);
		background(0);
		imageMode(CENTER);
		image(this.img, this.width/2, this.height/2);
	}

	public void draw() {
		stroke(255);
		if (this.mousePressed) {
			line(this.mouseX,this.mouseY,this.pmouseX,this.pmouseY);
		}
	}

	@Override
	public void mouseDragged(MouseEvent arg0) {
		// TODO Auto-generated method stub
		super.mouseDragged(arg0);
		arg0.getButton();
	}
	
	/**
	 * @param args
	 */
	public static void main(String[] args) {
		PApplet.main(new String[] {"--present","com.onearmedman.processing.ProcessingTest"});
	}

}

