jp 0.4.0

An attempt at a friendly graphics API
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
extern crate jp;

fn main() {
    jp::create_window("Test", 150, 150)
        .draw(|mut g, c| {
            g.rectangle(
                c.state()
                .translate(c.width() / 2.0, c.height() / 2.0)
                .fill([1.0, 0.0, 0.0, 1.0]),
                50, 50);
            g.ellipse(
                c.state()
                .translate(c.width() / 2.0, c.height() / 2.0)
                .fill([0.0, 1.0, 0.0, 1.0]),
                50, 50);
        })
        .run();
}