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

/* 
 * Program that 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;
    }
    
}



