README.md
1# svg_fmt
2
3A set of simple types using `Display` formatters `{}` to easily write in the SVG format.
4This can be useful to dump information in a visual way when debugging.
5
6The crate is very small (and has no dependency).
7
8## Example
9
10```rust
11use svg_fmt::*;
12
13println!("{}", BeginSvg { w: 800.0, h: 600.0 });
14println!(" {}",
15 rectangle(20.0, 50.0, 200.0, 100.0)
16 .fill(Fill::Color(red()))
17 .stroke(Stroke::Color(black(), 3.0))
18 .border_radius(5.0)
19);
20println!(" {}",
21 text(25.0, 100.0, "Hi!")
22 .size(42.0)
23 .color(white())
24);
25println!("{}", EndSvg);
26
27```
28
29