orhanbalci/rough-rs
orhanbalci/rough-rs has 57 GitHub stars and 11 forks. GitHot measured 0 stars in 24 hours and 0 in 7 days. Last checked 2026-11-16 00:02 UTC. Last push 2026-11-04.
Measured star growth
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- Update delayed
- in 1 month
- Update delayed
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
About
draw handy sketches from your rust applications
Creative & MediaREADME.md
Originalrough-rs


This repository contains a set of crates which in result resembles functionality in Rough.js
points_on_curve rustlang port of points-on-curve npm package written by @pshihn.
svg_path_ops originates from path-data-parser but not limited to this packages functionality
rough_piet adapter between roughr and piet
rough_plotters_svg adapter between roughr and plotters-svg
rough_tiny_skia adapter between roughr and tiny-skia
rough_iced adapter between roughr and iced
rough_vello adapter between roughr and vello
π Quick Start
roughr generates the sketchy shapes; an adapter crate draws them with your graphics
library. With rough_tiny_skia,
drawing to a PNG looks like this:
[dependencies]
roughr = "0.14"
rough_tiny_skia = "0.14"
palette = "0.7"
tiny-skia = "0.11"
use palette::Srgba;
use rough_tiny_skia::SkiaGenerator;
use roughr::core::{FillStyle, OptionsBuilder};
use tiny_skia::Pixmap;
fn main() {
let options = OptionsBuilder::default()
.stroke(Srgba::from_components((114u8, 87u8, 82u8, 255u8)).into_format())
.fill(Srgba::from_components((254u8, 246u8, 201u8, 255u8)).into_format())
.fill_style(FillStyle::Hachure)
.fill_weight(1.0)
.roughness(1.5)
.build()
.unwrap();
let generator = SkiaGenerator::new(options);
let mut pixmap = Pixmap::new(300, 200).unwrap();
pixmap.fill(tiny_skia::Color::from_rgba8(150, 192, 183, 255));
generator.rectangle::<f32>(50.0, 50.0, 200.0, 100.0).draw(&mut pixmap.as_mut());
generator.circle::<f32>(150.0, 100.0, 60.0).draw(&mut pixmap.as_mut());
pixmap.save_png("sketch.png").unwrap();
}
The other adapters work the same way: build Options, create the adapter's generator,
then draw the shapes it returns.
ποΈ Options
Options controls how every shape is sketched. All fields have defaults, so set only what
you want to change. Each image draws the same shape with one option changed, from left to
right.


All options


















Every option and its default is described in the
Options docs. To try them
interactively, run the drawing_app
example: cargo run -p rough_iced --example drawing_app.
π§Ύ Drawing SVG Files
roughr can sketch SVG path data, and with usvg whole SVG
files, including shapes like <rect> and <circle>, transforms and colors:

cargo run -p rough_tiny_skia --example svg -- input.svg output.png
See the svg example
and the roughr docs
for how it works.
π¦ Crate Versions
The table below shows the current version of each crate and the versions of the
other workspace crates it depends on. A β means there is no dependency.
| Crate | Version | points_on_curve | svg_path_ops | roughr |
|---|---|---|---|---|
| points_on_curve | 0.7.0 | β | β | β |
| svg_path_ops | 0.12.0 | β | β | β |
| roughr | 0.14.0 | 0.7.0 | 0.12.0 | β |
| rough_piet | 0.15.0 | β | 0.12.0 | 0.14.0 |
| rough_tiny_skia | 0.14.1 | β | 0.12.0 | 0.14.0 |
| rough_vello | 0.16.0 | β | 0.12.0 | 0.14.0 |
| rough_iced | 0.15.0 | β | 0.12.0 | 0.14.0 |
| rough_plotters_svg | 0.3.0 | β | β | 0.14.0 |
Dependency requirements use Cargo's default caret semantics, so a requirement of
0.11.0resolves to any0.11.xβ thesvg_path_ops 0.11.1bug-fix release is picked up automatically without republishing the dependent crates.
π 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.