From 1b136913b2861d7df05abef0849a1e0a8b41c992 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jindra=20Pet=C5=99=C3=ADk?= Date: Sat, 22 Oct 2022 22:40:42 +0200 Subject: [PATCH] bitmap shape exporter - ignore strokes when bound rect has zero width/height --- .../flash/exporters/shape/BitmapExporter.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/shape/BitmapExporter.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/shape/BitmapExporter.java index bc9f9f81e..9e7c42f7f 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/shape/BitmapExporter.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/shape/BitmapExporter.java @@ -411,8 +411,14 @@ public class BitmapExporter extends ShapeExporterBase { } } - if (thickness < 0) { - thickness = -thickness; + if (Double.isNaN(thickness) || Double.compare(thickness, 0.0d) == 0) { //for example when bounding box width/height is zero + lineStroke = null; + lineColor = null; + return; + } else { + if (thickness < 0) { + thickness = -thickness; + } } if (joinStyle == BasicStroke.JOIN_MITER) {