Crates.io | cairo-svgpath |
lib.rs | cairo-svgpath |
version | 0.1.1 |
source | src |
created_at | 2019-02-03 22:37:10.53109 |
updated_at | 2019-02-04 17:04:37.435638 |
description | Draw on cairo surfaces using SVG path syntax, with compile-time parsing and conversion. |
homepage | |
repository | https://github.com/NieDzejkob/cairo-svgpath |
max_upload_size | |
id | 112466 |
size | 9,010 |
Draw on cairo surfaces using SVG path syntax, with compile-time parsing and conversion.
use cairo_svgpath::svgpath;
fn before(ctx: &cairo::Context) {
ctx.move_to(1, 2);
ctx.line_to(3, 4);
ctx.curve_to(5, 6, 7, 8, 9, 10);
}
fn after(ctx: &cairo::Context) {
svgpath!(ctx, "M1 2L3 4C5 6 7 8 9 10");
}