davidgutierrezrubio / jmathanim

A Java library to make mathematical animations
https://davidgutierrezrubio.github.io/jmathanim/
20 stars 2 forks source link

SVGUtils can't handle Point, JMImage object #18

Open rensx opened 1 month ago

rensx commented 1 month ago

MultiShapeObject class can handle Shape object only: ...private final ArrayList shapes...

rensx commented 4 weeks ago

partially solved. Change MultiShapeObject to MathObjectGroup //emoji: 🥳🧁🍰🎁🎂🎈 SVG generated with pango-cairo

case "use": String base64content = defMap.get(el.getAttribute("xlink:href")); if (base64content.contains("data:image")) { JMImage img = new JMImage(base64content); img.scale(Point.at(0, 0), 300); //Unreasonable but works!? transfCopy.applyTransform(img); msh.add(img);

} else { ... } break;

davidgutierrezrubio commented 1 week ago

MultiShapeObject is designed to handle only Shapes. The problem of importing images attached to a SVG object should be solved using a subclass of MUltiShape that allows images. I will look at it. Thanks!