[][src]Module mksvg::path

path exists to make paths much easier to write svg paths while you can make the path anywey you like and send that as the argument, it may be simpler to create it like below:

use mksvg::*;
let mut s = "".to_string();
{
    let mut svg = SvgFmt::new(&mut s);
    // ... normally do svg start
    Tag::path(PathD::rel().m(5,5).l(10,10)).stroke("black").write(&mut svg);
    // ... normally do svg end
}

assert_eq!("<path d=\"m 5 5 l 10 10 \" style=\"stroke:black;\" />\n"
            ,&s);

Structs

PNode
PathD