Hi Jan, Riyaz, So the first question to ask when you say 'bounding box' is the bounding box in what coordinate system? And how important is it that the bounding box be 'tight'?
So Jan gives one way of doing it which seems to try and get the bounds in screen coords, (but the code assumes there are no transforms between the element and the root of the SVG tree - this can be fixed by including the results of node.getGlobalTransform()). You could also just use the SVGLocatable interface on the DOM Element (see the SVG specification). This would generally be preferable but if you need tight bounds in any coordinate system other than the user coordinate system you will have to use the various GraphicsNode methods (like getTransformedBounds). >>>>> "LJ" == Lolling, Jan <[EMAIL PROTECTED]> writes: LJ> canvas.getBridgeContext() is a tmhode from an extention from LJ> JSVGCanvas and get back the protected member brigdeContext. LJ> Jan LJ> -----Ursprungliche Nachricht----- Von: [EMAIL PROTECTED] LJ> [mailto:[EMAIL PROTECTED] Gesendet: Montag, 24. Marz 2003 19:52 LJ> An: [EMAIL PROTECTED] Betreff: SVG element's bounding LJ> box.. LJ> Hi all, LJ> I am reading in a svg file and I want to get the bounding LJ> box of one of the svg elements inside it using Java/Batik. What LJ> are the steps to go about doing it? Any examples would help. I am LJ> using batik 1.4beta. LJ> I really appreciate your time. LJ> Thanks in advance. -Riyaz. LJ> --------------------------------------------------------------------- LJ> To unsubscribe, e-mail: [EMAIL PROTECTED] For LJ> additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
