use potlood::{Color, Paper, Pixel};

fn main() {
    // Let's throw some shapes!
    let width = 800;
    let height = 600;
    let mut paper = Paper::new(width, height);

    paper.fill(Pixel::color(Color::White));
    paper.set_vertical(width / 2, Pixel::color(Color::Blue));
    paper.set_horizontal(height / 2, Pixel::color(Color::Red));
    paper.rect(width / 4, height / 4, 100, 200, Pixel::color(Color::Red));
    paper.line(0, 0, width, height, Pixel::color(Color::Blue));
    paper.line(0, 0, width / 2, height, Pixel::color(Color::Blue));
    paper.line(0, 0, width / 4, height, Pixel::color(Color::Blue));
    paper.line(0, 0, width / 8, height, Pixel::color(Color::Blue));
    paper.line(0, 0, width, height / 2, Pixel::color(Color::Blue));
    paper.line(0, 0, width, height / 4, Pixel::color(Color::Blue));
    paper.line(0, 0, width, height / 8, Pixel::color(Color::Blue));
    paper.circle(
        3 * width / 4,
        3 * height / 4,
        100,
        Pixel::color(Color::Green),
    );
    paper
        .generate("./shapes.ppm".to_string())
        .expect("something went wrong");
}
