mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-27 13:18:12 +08:00
Path Bool library code cleanup (#2000)
* Remove log statements * Add feature gates to functions in path.rs * Fix infinite parsing loop and add new test * License tweaks * Remove trailing zero in whole number floats * Flatten visual-tests directory * Code review * Clean up printlines * Add error handling to path parsing --------- Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
co-authored by
Keavon Chambers
parent
3ddc052538
commit
8a1089938e
@@ -28,8 +28,8 @@ Here's a basic example of performing an intersection operation on two paths:
|
||||
use path_bool::{path_boolean, FillRule, PathBooleanOperation, path_from_path_data, path_to_path_data};
|
||||
|
||||
fn main() {
|
||||
let path_a = path_from_path_data("M 10 10 L 50 10 L 30 40 Z");
|
||||
let path_b = path_from_path_data("M 20 30 L 60 30 L 60 50 L 20 50 Z");
|
||||
let path_a = path_from_path_data("M 10 10 L 50 10 L 30 40 Z").unwrap();
|
||||
let path_b = path_from_path_data("M 20 30 L 60 30 L 60 50 L 20 50 Z").unwrap();
|
||||
|
||||
let result = path_boolean(
|
||||
&path_a,
|
||||
@@ -50,13 +50,14 @@ The boolean operations are implemented using a graph-based approach. After the p
|
||||
|
||||
## Development status
|
||||
|
||||
This project is a port of PathBool.js and is still in early stages of development. Contributions, bug reports, and feedback are welcome.
|
||||
This project is a port of PathBool.js which is still in early stages of development. Contributions, bug reports, and feedback are welcome.
|
||||
|
||||
Future work includes:
|
||||
|
||||
- Comprehensive test suite
|
||||
- Performance optimizations
|
||||
- Additional examples and documentation
|
||||
- Support for path builder tool features
|
||||
|
||||
## License and acknowledgements
|
||||
|
||||
|
||||
Reference in New Issue
Block a user