rough_piet
This crate is an adapter crate between roughr and piet crates. Converts from roughr drawing primitives to piets path types. Also has convenience traits for drawing onto piet contexts. For more detailed information you can check roughr crate.
Below examples are output of rough_piet adapter.
📦 Cargo.toml
[]
= "0.1"
🔧 Example
Rectangle
let options = default
.stroke
.fill
.fill_style
.fill_weight
.build
.unwrap;
let generator = new;
let rect_width = 100.0;
let rect_height = 50.0;
let rect = generator.;
let background_color = from_hex_str.unwrap;
rc.fill;
rect.draw;
🖨️ Output Rectangle

Circle
let options = default
.stroke
.fill
.fill_style
.fill_weight
.build
.unwrap;
let generator = new;
let circle_paths = generator.;
let background_color = from_hex_str.unwrap;
rc.fill;
circle_paths.draw;
🖨️ Output Circle

Ellipse
let options = default
.stroke
.fill
.fill_style
.fill_weight
.build
.unwrap;
let generator = new;
let ellipse_paths = generator.;
let background_color = from_hex_str.unwrap;
rc.fill;
ellipse_paths.draw;
🖨️ Output Ellipse

Svg Path
let options = default
.stroke
.fill
.fill_style
.fill_weight
.build
.unwrap;
let generator = new;
let heart_svg_path = "M140 20C73 20 20 74 20 140c0 135 136 170 228 303 88-132 229-173 229-303 0-66-54-120-120-120-48 0-90 28-109 69-19-41-60-69-108-69z".into;
let heart_svg_path_drawing = generator.;
let background_color = from_hex_str.unwrap;
rc.fill;
heart_svg_path_drawing.draw;
🖨️ Output Svg Path

Filler Implementation Status
- Hachure
- Zigzag
- Cross-Hatch
- Dots
- Dashed
- Zigzag-Line
🔭 Examples
For more examples have a look at the examples folder.
📝 License
Licensed under MIT License (LICENSE).
🚧 Contributions
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this project by you, as defined in the MIT license, shall be licensed as above, without any additional terms or conditions.