Crates.io | svg_avatars |
lib.rs | svg_avatars |
version | 0.1.3 |
source | src |
created_at | 2024-02-14 17:05:42.370045 |
updated_at | 2024-02-21 16:37:56.511961 |
description | A Rust library for generating SVG avatars from identifiers. |
homepage | https://github.com/nathiss/svg_avatars |
repository | https://github.com/nathiss/svg_avatars |
max_upload_size | |
id | 1140032 |
size | 25,274 |
A Rust library for generating SVG avatars from identifiers.
use svg_avatars::{Rings, SvgAvatarBuilder};
fn main() {
let svg = SvgAvatarBuilder::new()
.identifier("foo")
.rings(Rings::Three)
.stroke_color("black")
.build();
svg.save("bar.svg").unwrap();
}
This produces the bar.svg
file with the following content:
MIT; see the LICENSE.txt file.