From d65d5f733362504f3411efeb945cca3724aa0b17 Mon Sep 17 00:00:00 2001 From: Thomas Oster Date: Sun, 6 Oct 2024 13:12:26 +0200 Subject: [PATCH] WIP: ignore tspan (for the moment) --- .../graphicelements/svgsupport/SVGImporter.java | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/src/main/java/de/thomas_oster/visicut/model/graphicelements/svgsupport/SVGImporter.java b/src/main/java/de/thomas_oster/visicut/model/graphicelements/svgsupport/SVGImporter.java index 37dab4ae..26a07be4 100644 --- a/src/main/java/de/thomas_oster/visicut/model/graphicelements/svgsupport/SVGImporter.java +++ b/src/main/java/de/thomas_oster/visicut/model/graphicelements/svgsupport/SVGImporter.java @@ -18,17 +18,7 @@ **/ package de.thomas_oster.visicut.model.graphicelements.svgsupport; -import com.kitfox.svg.Defs; -import com.kitfox.svg.Gradient; -import com.kitfox.svg.Group; -import com.kitfox.svg.ImageSVG; -import com.kitfox.svg.PatternSVG; -import com.kitfox.svg.SVGConst; -import com.kitfox.svg.SVGElement; -import com.kitfox.svg.SVGException; -import com.kitfox.svg.SVGRoot; -import com.kitfox.svg.SVGUniverse; -import com.kitfox.svg.ShapeElement; +import com.kitfox.svg.*; import com.kitfox.svg.xml.NumberWithUnits; import com.kitfox.svg.xml.StyleAttribute; import de.thomas_oster.liblasercut.platform.Util; @@ -106,6 +96,10 @@ private void importNode(SVGElement e, List result, double svgReso result.add(new SVGImage((ImageSVG) e)); } } + //Do not import tspan children + if (e instanceof Text) { + return; + } for (int i = 0; i < e.getNumChildren(); i++) { importNode(e.getChild(i), result, svgResolution, warnings);