From 3fc628beecdfb07feb25c6501070d73090e68f3c Mon Sep 17 00:00:00 2001
From: jaseg <git@jaseg.de>
Date: Thu, 11 Feb 2021 00:18:54 +0100
Subject: Fix handling of stroke width under transformations

---
 svg-flatten/src/svg_doc.cpp | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/svg-flatten/src/svg_doc.cpp b/svg-flatten/src/svg_doc.cpp
index e9c9dfc..0ae9b68 100644
--- a/svg-flatten/src/svg_doc.cpp
+++ b/svg-flatten/src/svg_doc.cpp
@@ -231,10 +231,15 @@ void gerbolyze::SVGDocument::export_svg_path(const RenderSettings &rset, const p
     }
 
     /* Load path from SVG path data and transform into document units. */
-    PolyTree ptree;
     cairo_save(cr);
     apply_cairo_transform_from_svg(cr, node.attribute("transform").value());
+
+    PolyTree ptree;
     load_svg_path(cr, node, ptree);
+
+    double _y = 0;
+    cairo_user_to_device_distance(cr, &stroke_width, &_y);
+
     cairo_restore (cr);
 
     Paths open_paths, closed_paths;
-- 
cgit