From 46f8e9a20cbd75577f09679b9f6bedfbd7277522 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jindra=20Pet=C5=99=C3=ADk?= Date: Sun, 4 Apr 2021 18:01:56 +0200 Subject: [PATCH] Fixed: #1678 Flash viewer - shapes with mitter join do not render correctly --- CHANGELOG.md | 2 ++ .../flash/exporters/shape/MiterClipBasicStroke.java | 7 +++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 045558141..9fc722fc5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,6 +31,7 @@ All notable changes to this project will be documented in this file. - [#1676] Messages on movie tags when Flash Player ActiveX not available - [#1677] DefineFont2/3 - missing codeTableOffset if numGlyphs is zero and font has layout - AS decompilation - §§push before loop +- [#1678] Flash viewer - shapes with mitter join do not render correctly ## [14.3.1] - 2021-03-25 ### Fixed @@ -2191,6 +2192,7 @@ All notable changes to this project will be documented in this file. [#1671]: https://www.free-decompiler.com/flash/issues/1671 [#1672]: https://www.free-decompiler.com/flash/issues/1672 [#1677]: https://www.free-decompiler.com/flash/issues/1677 +[#1678]: https://www.free-decompiler.com/flash/issues/1678 [#1665]: https://www.free-decompiler.com/flash/issues/1665 [#1661]: https://www.free-decompiler.com/flash/issues/1661 [#1435]: https://www.free-decompiler.com/flash/issues/1435 diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/shape/MiterClipBasicStroke.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/shape/MiterClipBasicStroke.java index 43a98ded8..fe9a515ce 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/shape/MiterClipBasicStroke.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/shape/MiterClipBasicStroke.java @@ -106,6 +106,9 @@ public class MiterClipBasicStroke implements Stroke { int type; float points[] = new float[6]; + Area area = new Area(stroke.createStrokedShape(p)); + AffineTransform t = new AffineTransform(); + List vectors = new ArrayList<>(); List offPath = new ArrayList<>(); float x = 0; @@ -114,6 +117,8 @@ public class MiterClipBasicStroke implements Stroke { type = pi.currentSegment(points); switch (type) { case PathIterator.SEG_MOVETO: + vectors.add(new Vector(x, y, points[0], points[1])); + offPath.add(true); x = points[0]; y = points[1]; break; @@ -145,8 +150,6 @@ public class MiterClipBasicStroke implements Stroke { pi.next(); } - Area area = new Area(stroke.createStrokedShape(p)); - AffineTransform t = new AffineTransform(); for (int i = 0; i < vectors.size() - 1; i++) { if (offPath.get(i)) { continue;