<http://batik.2283329.n4.nabble.com/file/n4655935/postSVG.jpg>
Hello,
I try to parse the path data from an SVG file into a (JAVA) shape.
the result is, however, as can be seen in the images is not complete.
Can you tell me if I do something wrong e.g.when iterating the d-attributes?
CODE:
String parser = XMLResourceDescriptor.getXMLParserClassName();
SAXSVGDocumentFactory f = new SAXSVGDocumentFactory(parser);
Document doc = f.createDocument(getClass().getResource(path)
.toString());
PathParser pp = new PathParser();
AWTPathProducer ap = new AWTPathProducer();
pp.setPathHandler(ap);
NodeList nl = doc.getElementsByTagName("path");
for (int i = 0; i < nl.getLength(); i++) {
Element elm = (Element) nl.item(i);
// Get path data
String pathData = elm.getAttribute("d");
pp.parse(pathData);
--
View this message in context:
http://batik.2283329.n4.nabble.com/Path-Data-from-SVG-not-complete-tp4655935.html
Sent from the Batik - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]