summaryrefslogtreecommitdiffstats
path: root/svgbob/examples/demo.rs
blob: 37b51732063acdfe4cc76163fc8744f17e1ccb11 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
extern crate svg;
extern crate svgbob;

use svgbob::Grid;
use svgbob::Settings;

fn main() {
    let file = "examples/demo.svg";
    let arg = include_str!("demo.bob");
    let g = Grid::from_str(arg, &Settings::default());
    let svg = g.get_svg();
    svg::save(file, &svg).unwrap();
    println!("Saved to {}", file);
}