import objectdraw.*;
import java.awt.*;

/* program which allows you to draw continuous lines
   on the screen */
public class Scribble extends WindowController{

	// first coordinate of a line segment
	private Location nextLineStarts;

	// save the first coordinate of the line
	public void onMousePress(Location point){
		nextLineStarts = point;
	}

	// as the user is dragging draw a line from 
	// previous point to current point.
	public void onMouseDrag(Location point){
		new Line(nextLineStarts, point, canvas);
		nextLineStarts = point;
	}
   
}