Hi all,

I'm having a problem getting the bounding box of a Text element. I have
trawled the archives, and from what I could see, I couldn't see anything
wrong with my code. I've included this below. When I run this I get the
following output.

The label is not null
The x is 100
The y is 100
The bounding box is null

As always, thanks in advance for any help here,

Dylan

--------------------------------------------

        labelText = (SVGOMTextElement)doc.getElementById("errorMessage");
        if(labelText == null){
            System.out.println("The label is null");
            return null;            
        }else{
            System.out.println("The label is not null");
            System.out.println("The x is " + labelText.getAttribute("x"));
            System.out.println("The y is " + labelText.getAttribute("y"));
        }
        SVGRect rect = labelText.getBBox();
        if(rect == null){
            System.out.println("The bounding box is null");
            return null;
        }else{
            System.out.println("The bounding box is not null");
        }


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

Reply via email to