Function svgbob::to_svg

source ·
pub fn to_svg(ascii: &str) -> String
Examples found in repository?
examples/demo.rs (line 9)
5
6
7
8
9
10
11
12
fn main() -> io::Result<()> {
    let art = include_str!("../test_data/demo.bob");
    let t1 = Instant::now();
    fs::create_dir_all("out")?;
    fs::write("out/demo.svg", svgbob::to_svg(art))?;
    println!("took {}ms", t1.elapsed().as_millis());
    Ok(())
}
More examples
Hide additional examples
examples/long.rs (line 9)
5
6
7
8
9
10
11
12
fn main() -> io::Result<()> {
    let art = include_str!("../test_data/long.bob");
    let t1 = Instant::now();
    fs::create_dir_all("out")?;
    fs::write("out/long.svg", svgbob::to_svg(art))?;
    println!("took {}ms", t1.elapsed().as_millis());
    Ok(())
}
examples/merge.rs (line 9)
5
6
7
8
9
10
11
12
fn main() -> io::Result<()> {
    let art = include_str!("../test_data/merge.bob");
    let t1 = Instant::now();
    fs::create_dir_all("out")?;
    fs::write("out/merge.svg", svgbob::to_svg(art))?;
    println!("took {}ms", t1.elapsed().as_millis());
    Ok(())
}
examples/simple.rs (line 9)
5
6
7
8
9
10
11
12
fn main() -> io::Result<()> {
    let art = include_str!("../test_data/simple.bob");
    let t1 = Instant::now();
    fs::create_dir_all("out")?;
    fs::write("out/simple.svg", svgbob::to_svg(art))?;
    println!("took {}ms", t1.elapsed().as_millis());
    Ok(())
}
examples/circles.rs (line 9)
5
6
7
8
9
10
11
12
fn main() -> io::Result<()> {
    let art = include_str!("../test_data/circles.bob");
    let t1 = Instant::now();
    fs::create_dir_all("out")?;
    fs::write("out/circles.svg", svgbob::to_svg(art))?;
    println!("took {}ms", t1.elapsed().as_millis());
    Ok(())
}
examples/example.rs (line 9)
5
6
7
8
9
10
11
12
fn main() -> io::Result<()> {
    let art = include_str!("../test_data/example.bob");
    let t1 = Instant::now();
    fs::create_dir_all("out")?;
    fs::write("out/example.svg", svgbob::to_svg(art))?;
    println!("took {}ms", t1.elapsed().as_millis());
    Ok(())
}