diff --git a/CHANGELOG.md b/CHANGELOG.md index 3ef4d9731..6b954b81b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,6 +32,7 @@ All notable changes to this project will be documented in this file. - Do not display lines with zero width - Not updating Morphshape end bounds - SVG import - linear gradients +- SVG import - Do not use fill winding nonzero when only stroking ### Changed - Basic tag info panel always visible even when nothing to display (to avoid flickering) diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/importers/svg/SvgImporter.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/importers/svg/SvgImporter.java index a86602222..5e5bbada1 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/importers/svg/SvgImporter.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/importers/svg/SvgImporter.java @@ -557,13 +557,16 @@ public class SvgImporter { private void processCommands(int shapeNum, SHAPEWITHSTYLE shapes, List commands, Matrix transform, SvgStyle style, boolean morphShape, boolean shape2) { if ("nonzero".equals(style.getFillRule())) { - if (!shape2 && (shapeTag instanceof DefineShape4Tag)) { - DefineShape4Tag shape4 = (DefineShape4Tag) shapeTag; - shape4.usesFillWindingRule = true; - } - if (shape2 && (endShape instanceof DefineShape4Tag)) { - DefineShape4Tag shape4 = (DefineShape4Tag) endShape; - shape4.usesFillWindingRule = true; + SvgFill fill = style.getFill(); + if (fill != null && !(fill instanceof SvgTransparentFill)) { + if (!shape2 && (shapeTag instanceof DefineShape4Tag)) { + DefineShape4Tag shape4 = (DefineShape4Tag) shapeTag; + shape4.usesFillWindingRule = true; + } + if (shape2 && (endShape instanceof DefineShape4Tag)) { + DefineShape4Tag shape4 = (DefineShape4Tag) endShape; + shape4.usesFillWindingRule = true; + } } }