ex1/
ex1.rs

1use std::fs::File;
2use turtle_graphics::{Canvas, Turtle};
3
4fn main() {
5    let mut t = Canvas::new();
6    t.forward(100.0);
7    t.right(90.0);
8    t.forward(100.0);
9    t.pen_up();
10    t.forward(10.0);
11    t.pen_down();
12    t.right(90.0);
13    t.forward(100.0);
14    t.right(90.0);
15    t.forward(100.0);
16    t.save_svg(&mut File::create("test.svg").unwrap()).unwrap();
17    t.save_eps(&mut File::create("test.eps").unwrap()).unwrap();
18}