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

/**
 * See <http://www.jacksonpollock.org/>
 */
public class PaintLikeJacksonPollock extends WindowController {
    
    private RandomIntGenerator palette = new RandomIntGenerator(0,255);
    private RandomIntGenerator dim = new RandomIntGenerator(2,10);
    private Color color;
    private FilledOval oval;
    private int dim2;
    
    public void begin() {
        color = new Color(palette.nextValue(), palette.nextValue(), palette.nextValue());        
    }
    
    public void onMousePress(Location point) {
        color = new Color(palette.nextValue(), palette.nextValue(), palette.nextValue());
        oval = new FilledOval(point, 20, 21, canvas);
        oval.setColor(color);
    }
    
    public void onMouseMove(Location point) {
        dim2 = dim.nextValue();
        oval = new FilledOval(point, dim2, dim2, canvas);
        oval.setColor(color);
    }
        
}
