diff options
author | jaseg <git@jaseg.de> | 2021-04-25 18:42:43 +0200 |
---|---|---|
committer | jaseg <git@jaseg.de> | 2021-04-25 18:42:43 +0200 |
commit | 5bb733e55948e9a4273ae0f7cee8e81e38c23206 (patch) | |
tree | 6b04b36b8df3f9da655db8b8764dfc3e95e33b55 /svg-flatten/src/svg_doc.cpp | |
parent | 6eb2c967a05a698b3da81168bcbcdc8c8368b490 (diff) | |
download | gerbolyze-5bb733e55948e9a4273ae0f7cee8e81e38c23206.tar.gz gerbolyze-5bb733e55948e9a4273ae0f7cee8e81e38c23206.tar.bz2 gerbolyze-5bb733e55948e9a4273ae0f7cee8e81e38c23206.zip |
Fix pattern rendering and some xform bugs
Diffstat (limited to 'svg-flatten/src/svg_doc.cpp')
-rw-r--r-- | svg-flatten/src/svg_doc.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/svg-flatten/src/svg_doc.cpp b/svg-flatten/src/svg_doc.cpp index bd22058..18b744b 100644 --- a/svg-flatten/src/svg_doc.cpp +++ b/svg-flatten/src/svg_doc.cpp @@ -152,8 +152,8 @@ void gerbolyze::SVGDocument::export_svg_group(xform2d &mat, const RenderSettings } else { clip_path = *lookup; + local_xf.transform_paths(clip_path); } - local_xf.transform_paths(clip_path); /* Clip against parent's clip path (both are now in document coordinates) */ if (!parent_clip_path.empty()) { @@ -251,9 +251,10 @@ void gerbolyze::SVGDocument::export_svg_path(xform2d &mat, const RenderSettings c.AddPaths(fill_paths, ptSubject, /* closed */ true); c.AddPaths(clip_path, ptClip, /* closed */ true); c.StrictlySimple(true); + /* fill rules are nonzero since both subject and clip have already been normalized by clipper. */ - c.Execute(ctIntersection, ptree, pftNonZero, pftNonZero); - PolyTreeToPaths(ptree, fill_paths); + c.Execute(ctIntersection, ptree_fill, pftNonZero, pftNonZero); + PolyTreeToPaths(ptree_fill, fill_paths); } /* Call out to pattern tiler for pattern fills. The path becomes the clip here. */ |