Hello,
I'm developing a java web application which generates
svg using Batik's SVG DOM library.
Therefore I need to get the width of text elements to
wrap text dynamically while generating the svg
document.
The problem is that when I try to get the bounding box
of a text element a NullPointerException is thrown.
Here is the part of my source code which throws the
exception:
...
if (textElement instanceof SVGLocatable) {
SVGRect bbox = ((SVGLocatable)textElement).getBBox();
System.out.println(bbox.getWidth()); // <-- exception
}
...
Here is the interesting part of the thrown exception:
java.lang.NullPointerException
at
org.apache.batik.dom.svg.SVGLocatableSupport$1.getWidth(Unknown
Source)
....
Any help and suggestions to solve the problem is
greatly appreciated!
Thanks,
Stefan
__________________________________
Do you Yahoo!?
Exclusive Video Premiere - Britney Spears
http://launch.yahoo.com/promos/britneyspears/
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]