most_basic/
most_basic.rs

1extern crate jp;
2
3fn main() {
4    jp::create_window("Test", 150, 150)
5        .draw(|mut g, c| {
6            g.rectangle(
7                c.state()
8                .translate(c.width() / 2.0, c.height() / 2.0)
9                .fill([1.0, 0.0, 0.0, 1.0]),
10                50, 50);
11            g.ellipse(
12                c.state()
13                .translate(c.width() / 2.0, c.height() / 2.0)
14                .fill([0.0, 1.0, 0.0, 1.0]),
15                50, 50);
16        })
17        .run();
18}