Fixed Do not display lines with zero width

This commit is contained in:
Jindra Petřík
2023-10-27 17:47:58 +02:00
parent e60f790e53
commit 4d0a8c0011
4 changed files with 9 additions and 2 deletions

View File

@@ -162,7 +162,7 @@ public class SVGMorphShapeExporter extends DefaultSVGMorphShapeExporter {
path.setAttribute("stroke", color.toHexRGB());
path.appendChild(createAnimateElement("stroke", color.toHexRGB(), colorEnd.toHexRGB()));
}
path.setAttribute("stroke-width", Double.toString(thickness == 0 ? 1 : thickness));
path.setAttribute("stroke-width", Double.toString(thickness));
path.appendChild(createAnimateElement("stroke-width", thickness, thicknessEnd));
if (color instanceof RGBA) {

View File

@@ -407,6 +407,12 @@ public class BitmapExporter extends ShapeExporterBase {
finalizePath();
linePaint = null;
lineTransform = null;
if (thickness == 0) {
lineColor = null;
return;
}
lineColor = color == null ? null : color.toColor();
int capStyle = BasicStroke.CAP_ROUND;
switch (startCaps) {

View File

@@ -169,7 +169,7 @@ public class SVGShapeExporter extends DefaultSVGShapeExporter {
if (color != null) {
path.setAttribute("stroke", color.toHexRGB());
}
path.setAttribute("stroke-width", Double.toString(thickness == 0 ? 1 : thickness));
path.setAttribute("stroke-width", Double.toString(thickness));
if (color instanceof RGBA) {
RGBA colorA = (RGBA) color;
if (colorA.alpha != 255) {