Hi VYang,

vyang <[EMAIL PROTECTED]> wrote on 01/11/2007 11:26:00 AM:

> public void mouseClicked(MouseEvent e) {
>         JGVTComponent c = (JGVTComponent)e.getSource();
>         SVGSVGElement rootElement = svgDocument.getRootElement();

   First off you need to make sure that 'svgDocument' is
the same as 'JSVGCanvas.getDocument()'.

>         if(rootElement instanceof SVGLocatable)
>             System.out.println("instance of locatable");
> 
>         SVGLocatableSupport svgLoc = new SVGLocatableSupport();
>         SVGRect bbox = svgLoc.getBBox(ele);

   So the right thing to do here is:

        SVGRect bbox = rootElement.getBBox();

   There is very little reason for anyone to be poking
around in the batik.dom.svg package, unless they are
working on SVG/Batik DOM extensions.

>         System.out.println(bbox);

Reply via email to