• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

src/H03-May-2022-637531

.cargo-checksum.jsonH A D03-May-202289 11

.cargo_vcs_info.jsonH A D01-Jan-197074 65

Cargo.tomlH A D01-Jan-1970888 2522

Cargo.toml.orig-cargoH A D29-Apr-2019363 1311

README.mdH A D29-Apr-2019602 2921

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