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:
Dennis Kobert
2024-09-23 12:16:31 +02:00
committed by GitHub
co-authored by Keavon Chambers
parent 3ddc052538
commit 8a1089938e
175 changed files with 442 additions and 346 deletions
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg width="48" height="48" viewBox="0 0 48 48" version="1.1" id="svg1" xmlns="http://www.w3.org/2000/svg">
<path style="fill:#ff0000;stroke:#000000;stroke-width:1.99937;stroke-linecap:round;stroke-linejoin:round" d=""/>
</svg>

After

Width:  |  Height:  |  Size: 351 B

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg width="48" height="48" viewBox="0 0 48 48" version="1.1" id="svg1" xmlns="http://www.w3.org/2000/svg">
</svg>

After

Width:  |  Height:  |  Size: 239 B

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg width="48" height="48" viewBox="0 0 48 48" version="1.1" id="svg1" xmlns="http://www.w3.org/2000/svg">
<path style="fill:#ff0000;stroke:#000000;stroke-width:1.99937;stroke-linecap:round;stroke-linejoin:round" d=""/>
</svg>

After

Width:  |  Height:  |  Size: 351 B

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg width="48" height="48" viewBox="0 0 48 48" version="1.1" id="svg1" xmlns="http://www.w3.org/2000/svg">
</svg>

After

Width:  |  Height:  |  Size: 239 B

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg width="48" height="48" viewBox="0 0 48 48" version="1.1" id="svg1" xmlns="http://www.w3.org/2000/svg">
<path style="fill:#ff0000;stroke:#000000;stroke-width:1.99937;stroke-linecap:round;stroke-linejoin:round" d=""/>
</svg>

After

Width:  |  Height:  |  Size: 351 B

@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg width="48"
height="48"
viewBox="0 0 48 48"
version="1.1"
id="svg1"
xmlns="http://www.w3.org/2000/svg">
<path style="fill:#ff0000;stroke:#000000;stroke-width:1.99937;stroke-linecap:round;stroke-linejoin:round"
d="M 7.5980087,6.9364914 C 18.588406,7.9541084 22.115946,15.280819 21.098329,20.776017 c -1.017617,5.495199 -1.899419,10.583615 2.171049,14.179063 4.070468,3.595448 2.103141,10.040025 -14.2466391,8.886924"
id="a"/>
<path style="fill:#ff0000;stroke:#000000;stroke-width:1.99937;stroke-linecap:round;stroke-linejoin:round"
d="m 32.835045,8.3612215 c 0,0 -17.028192,1.6281211 -17.0961,10.1082635 -0.06791,8.480142 10.379893,5.2239 10.990397,8.276751 0.610504,3.052851 -9.362276,7.530433 -8.887255,10.515377 0.47502,2.984943 6.580391,13.364505 20.555732,3.52754"
id="b"/>
</svg>

After

Width:  |  Height:  |  Size: 976 B

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg width="48" height="48" viewBox="0 0 48 48" version="1.1" id="svg1" xmlns="http://www.w3.org/2000/svg">
<path style="fill:#ff0000;stroke:#000000;stroke-width:1.99937;stroke-linecap:round;stroke-linejoin:round" d=""/>
</svg>

After

Width:  |  Height:  |  Size: 351 B