bitmap shape exporter - ignore strokes when bound rect has zero width/height

This commit is contained in:
Jindra Petřík
2022-10-22 22:40:42 +02:00
parent 31a461ca96
commit 1b136913b2

View File

@@ -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) {