------ snippet -------------------
.....
Element element = ..... any thing to do to retrieve the element....
Rectangle2D bounds;
GraphicsNode node = canvas.getBridgeContext().getGraphicsNode(element);
if (canvas.getRenderingTransform() != null) {
  bounds = node.getTransformedBounds(canvas.getRenderingTransform());
} else {
  bounds = node.getBounds();
}
....
------ snippet -------------------

canvas.getBridgeContext() is a tmhode from an extention from JSVGCanvas
and get back the protected member brigdeContext.

Jan

-----Ursprungliche Nachricht-----
Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Gesendet: Montag, 24. Marz 2003 19:52
An: [EMAIL PROTECTED]
Betreff: SVG element's bounding box..



Hi all, 

       I am reading in a svg file and I want to get the bounding box of one of the svg 
elements inside it using Java/Batik.  What are the steps to go about doing it? Any 
examples would help. 
I am using batik 1.4beta. 

I really appreciate your time. 

Thanks in advance. 
-Riyaz. 
   

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to