From eb7107a8c6025399ce7c41a3f0f4ae7d40861b32 Mon Sep 17 00:00:00 2001 From: jaseg Date: Wed, 29 Mar 2023 18:23:56 +0200 Subject: svg-flatten: Fix incorrect polarity for outlined strokes --- gerbolyze/tests/resources/layers.svg | 174 ++++---- svg-flatten/src/out_gerber.cpp | 1 - svg-flatten/src/svg_doc.cpp | 4 +- svg-flatten/testdata/svg/xform_uniformity.svg | 586 ++++++++++++++++++++++++++ 4 files changed, 675 insertions(+), 90 deletions(-) create mode 100644 svg-flatten/testdata/svg/xform_uniformity.svg diff --git a/gerbolyze/tests/resources/layers.svg b/gerbolyze/tests/resources/layers.svg index ff84f04..fd263c7 100644 --- a/gerbolyze/tests/resources/layers.svg +++ b/gerbolyze/tests/resources/layers.svg @@ -94,7 +94,7 @@ inkscape:document-units="mm" showgrid="false" inkscape:zoom="1.326224" - inkscape:cx="152.68914" + inkscape:cx="153.44316" inkscape:cy="302.3622" inkscape:window-width="1920" inkscape:window-height="1011" @@ -152,34 +152,34 @@ aria-label="Top Silk" transform="matrix(0.70241335,0,0,0.70241335,-8.580134,-1.2538705)" id="text245" - style="font-style:italic;font-size:9.00953px;font-family:'Bodoni Moda';-inkscape-font-specification:'Bodoni Moda Italic';text-align:justify;white-space:pre;shape-inside:url(#rect247);display:inline;opacity:1;stroke:#000000;stroke-width:0.17025887;stroke-linecap:round;stroke-dasharray:none;stroke-linejoin:round"> + style="font-style:italic;font-size:9.00953px;font-family:'Bodoni Moda';-inkscape-font-specification:'Bodoni Moda Italic';text-align:justify;white-space:pre;shape-inside:url(#rect247);display:inline;opacity:1;stroke:#000000;stroke-width:0.15660295;stroke-linecap:round;stroke-dasharray:none;stroke-linejoin:round"> @@ -191,34 +191,34 @@ aria-label="Top Mask" transform="matrix(0.70241335,0,0,0.70241335,-8.580134,9.5214689)" id="text1073" - style="font-style:italic;font-size:9.00953px;font-family:'Bodoni Moda';-inkscape-font-specification:'Bodoni Moda Italic';text-align:justify;white-space:pre;shape-inside:url(#rect1075);display:inline;opacity:1;stroke:#000000;stroke-width:0.18444711;stroke-linecap:round;stroke-dasharray:none;stroke-linejoin:round"> + style="font-style:italic;font-size:9.00953px;font-family:'Bodoni Moda';-inkscape-font-specification:'Bodoni Moda Italic';text-align:justify;white-space:pre;shape-inside:url(#rect1075);display:inline;opacity:1;stroke:#000000;stroke-width:0.17083958;stroke-linecap:round;stroke-dasharray:none;stroke-linejoin:round"> @@ -230,42 +230,42 @@ aria-label="Top Copper" transform="matrix(0.70241335,0,0,0.70241335,-8.5801339,20.296808)" id="text1138" - style="font-style:italic;font-size:9.00953px;font-family:'Bodoni Moda';-inkscape-font-specification:'Bodoni Moda Italic';text-align:justify;white-space:pre;shape-inside:url(#rect1140);display:inline;opacity:1;stroke:#000000;stroke-width:0.19863535;stroke-linecap:round;stroke-dasharray:none;stroke-linejoin:round"> + style="font-style:italic;font-size:9.00953px;font-family:'Bodoni Moda';-inkscape-font-specification:'Bodoni Moda Italic';text-align:justify;white-space:pre;shape-inside:url(#rect1140);display:inline;opacity:1;stroke:#000000;stroke-width:0.18507621;stroke-linecap:round;stroke-dasharray:none;stroke-linejoin:round"> @@ -277,54 +277,54 @@ aria-label="Bottom Copper" transform="matrix(0.70241335,0,0,0.70241335,-7.8207243,31.072148)" id="text1186" - style="font-style:italic;font-size:9.00953px;font-family:'Bodoni Moda';-inkscape-font-specification:'Bodoni Moda Italic';text-align:justify;white-space:pre;shape-inside:url(#rect1194);display:inline;opacity:1;stroke:#000000;stroke-width:0.21282358;stroke-linecap:round;stroke-dasharray:none;stroke-linejoin:round"> + style="font-style:italic;font-size:9.00953px;font-family:'Bodoni Moda';-inkscape-font-specification:'Bodoni Moda Italic';text-align:justify;white-space:pre;shape-inside:url(#rect1194);display:inline;opacity:1;stroke:#000000;stroke-width:0.19931284;stroke-linecap:round;stroke-dasharray:none;stroke-linejoin:round"> @@ -336,46 +336,46 @@ aria-label="Bottom Mask" transform="matrix(0.70241335,0,0,0.70241335,-7.8207243,41.847487)" id="text1178" - style="font-style:italic;font-size:9.00953px;font-family:'Bodoni Moda';-inkscape-font-specification:'Bodoni Moda Italic';text-align:justify;white-space:pre;shape-inside:url(#rect1190);display:inline;opacity:1;stroke:#000000;stroke-width:0.22701183;stroke-linecap:round;stroke-dasharray:none;stroke-linejoin:round;paint-order:normal"> + style="font-style:italic;font-size:9.00953px;font-family:'Bodoni Moda';-inkscape-font-specification:'Bodoni Moda Italic';text-align:justify;white-space:pre;shape-inside:url(#rect1190);display:inline;opacity:1;stroke:#000000;stroke-width:0.21354947;stroke-linecap:round;stroke-dasharray:none;stroke-linejoin:round;paint-order:normal"> @@ -387,46 +387,46 @@ aria-label="Bottom Silk" transform="matrix(0.70241335,0,0,0.70241335,-7.8207243,52.622826)" id="text1174" - style="font-style:italic;font-size:9.00953px;font-family:'Bodoni Moda';-inkscape-font-specification:'Bodoni Moda Italic';text-align:justify;white-space:pre;shape-inside:url(#rect1188);display:inline;opacity:1;stroke:#000000;stroke-width:0.24120007;stroke-linecap:round;stroke-dasharray:none;stroke-linejoin:round"> + style="font-style:italic;font-size:9.00953px;font-family:'Bodoni Moda';-inkscape-font-specification:'Bodoni Moda Italic';text-align:justify;white-space:pre;shape-inside:url(#rect1188);display:inline;opacity:1;stroke:#000000;stroke-width:0.2277861;stroke-linecap:round;stroke-dasharray:none;stroke-linejoin:round"> @@ -438,50 +438,50 @@ aria-label="Bottom Paste" transform="matrix(0.70241335,0,0,0.70241335,-7.8207243,63.398167)" id="text1182" - style="font-style:italic;font-size:9.00953px;font-family:'Bodoni Moda';-inkscape-font-specification:'Bodoni Moda Italic';text-align:justify;white-space:pre;shape-inside:url(#rect1192);display:inline;opacity:1;stroke:#000000;stroke-width:0.2553883;stroke-linecap:round;stroke-dasharray:none;stroke-linejoin:round"> + style="font-style:italic;font-size:9.00953px;font-family:'Bodoni Moda';-inkscape-font-specification:'Bodoni Moda Italic';text-align:justify;white-space:pre;shape-inside:url(#rect1192);display:inline;opacity:1;stroke:#000000;stroke-width:0.24202274;stroke-linecap:round;stroke-dasharray:none;stroke-linejoin:round"> @@ -493,54 +493,54 @@ aria-label="Board Outline" transform="matrix(0.70241335,0,0,0.70241335,-7.8207243,74.173506)" id="text1144" - style="font-style:italic;font-size:9.00953px;font-family:'Bodoni Moda';-inkscape-font-specification:'Bodoni Moda Italic';text-align:justify;white-space:pre;shape-inside:url(#rect1146-5);display:inline;fill:none;stroke:#000000;stroke-width:0.12769415;stroke-linecap:round;stroke-dasharray:none;stroke-linejoin:round"> + style="font-style:italic;font-size:9.00953px;font-family:'Bodoni Moda';-inkscape-font-specification:'Bodoni Moda Italic';text-align:justify;white-space:pre;shape-inside:url(#rect1146-5);display:inline;fill:none;stroke:#000000;stroke-width:0.12812968;stroke-linecap:round;stroke-dasharray:none;stroke-linejoin:round"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- cgit