Transforming a SVGGraphicsElement

Sebastian Janisch <[email protected]>
Newsgroups gmane.text.xml.batik.user
Message-ID <[email protected]>
Hey there, 

I am trying to figure out how to transform an existing SVGGraphicsElement.

what I have is the following:

String parser = XMLResourceDescriptor.getXMLParserClassName();
SAXSVGDocumentFactory factory = new SAXSVGDocumentFactory(parser);
		
StringReader reader = new StringReader(circle);
String circle = "<svg> ... a circle ... </svg>";
		
try {
	SVGDocument doc = factory.createSVGDocument("http://dialoguemaps.org", reader);
	SVGGraphicsElement element = (SVGGraphicsElement) doc.getFirstChild().getFirstChild();
			
} catch (IOException e) {
	e.printStackTrace();
}


This works fine. What I want to do now with the SVGGraphicsElement is to do a transformation like this:

SVGTransform transform = new SVGOMTransform();
transformTranslate(20, 20);

What I cannot figure out though is how to apply this transformation to the existing SVGGraphicsElement.


Hope somebody can help. I'd really appreciate it.


Best regards

Sebastian
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.