import java.awt.Color;


/**
 * EyeDropper Tool
 *
 * @author swansom1.
 *         Created Apr 14, 2008.
 */
public class Eyedrop implements Tools {
	
	private CanvasPanel canvas;

	/**
	 * creates the Eye Dropper
	 *
	 * @param canvas
	 */
	public Eyedrop(CanvasPanel canvas){
		this.canvas = canvas;
	}
	
	/**
	 * draws the Eye dropper
	 * 
	 * @param x 
	 * @param y 
	 * @return color
	 */

	public Color draw(int x, int y) {
		Color color = new Color(this.canvas.getImage().getRGB(x,y));
		return color;
	}

}
