svg_path_ops

Crates.iosvg_path_ops
lib.rssvg_path_ops
version0.8.0
sourcesrc
created_at2022-10-25 21:49:39.977556
updated_at2024-11-02 19:46:50.910941
descriptionSVG Path Manipulation Utilities
homepagehttps://github.com/orhanbalci
repositoryhttps://github.com/orhanbalci/rough-rs.git
max_upload_size
id697300
size578,592
Orhan Balci (orhanbalci)

documentation

README

svg_path_ops

Crates.io Documentation License

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.

📦 Cargo.toml

[dependencies]
svg_path_ops = "0.6"

🔧 Example

Translate

let translated_path = PathTransformer::new(cat_svg_path)
    .translate(230.0, 0.0)
    .to_string();

full example

🖨️ Output Translate

translate

Rotate

let translated_path = PathTransformer::new(cat_svg_path)
    .rotate(90.0, 126.0, 140.0)
    .translate(220.0, 0.0)
    .to_string();

full example

🖨️ Output Rotate

translate

Skew

let translated_path = PathTransformer::new(cat_svg_path)
    .skew_x(20.0)
    .translate(180.0, 0.0)
    .to_string();

full example

🖨️ Output Skew

translate

Scale

let translated_path = PathTransformer::new(cat_svg_path)
    .scale(0.5, 0.5)
    .translate(220.0, 60.0)
    .to_string();

full example

🖨️ Output Scale

translate

📝 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.

Commit count: 163

cargo fmt