Crates.io | svg_path_ops |
lib.rs | svg_path_ops |
version | 0.8.0 |
source | src |
created_at | 2022-10-25 21:49:39.977556 |
updated_at | 2024-11-02 19:46:50.910941 |
description | SVG Path Manipulation Utilities |
homepage | https://github.com/orhanbalci |
repository | https://github.com/orhanbalci/rough-rs.git |
max_upload_size | |
id | 697300 |
size | 578,592 |
This crate includes utility functions to work with svg paths. Works on types from svgtypes crate.
This package exposes functions to manipulate svg paths with simplification purposes. Also a path transformer fully compatible with svgpath is provided.
[dependencies]
svg_path_ops = "0.6"
let translated_path = PathTransformer::new(cat_svg_path)
.translate(230.0, 0.0)
.to_string();
let translated_path = PathTransformer::new(cat_svg_path)
.rotate(90.0, 126.0, 140.0)
.translate(220.0, 0.0)
.to_string();
let translated_path = PathTransformer::new(cat_svg_path)
.skew_x(20.0)
.translate(180.0, 0.0)
.to_string();
let translated_path = PathTransformer::new(cat_svg_path)
.scale(0.5, 0.5)
.translate(220.0, 60.0)
.to_string();
Licensed under MIT License (LICENSE).
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.