Path-Data from SVG not complete

Max Weis <[email protected]> Thu, 20 Mar 2014 14:07:43 -0700 (PDT)
Newsgroups gmane.text.xml.batik.user
Message-ID <[email protected]>
<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.