import objectdraw.*;

/*
 * When press mouse and drag,
 * draw lines radiating from initial point.
 */
public class Spirograph 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
   * initial point where mouse pressed to current point.
   */
  public void onMouseDrag(Location point) {
    new Line(nextLineStarts, point, canvas);
  }
}
