Thanks Cameron (and Tonny), yes, it is a static document but why I can not get a bounding box of an element when it comes from static document ? Maik ----- Original Message ----- From: "Cameron McCormack" <[EMAIL PROTECTED]> To: "Batik Users" <[EMAIL PROTECTED]> Sent: Tuesday, November 02, 2004 11:53 PM Subject: Re: bounding box exception
> Hi Maik. > > Maik Schrer proveo GmbH: > > after getBBox() from a SVGOMGElement and calling bbox.getWidth() e.g. I get > > following exception: > > java.lang.NullPointerException > > at org.apache.batik.dom.svg.SVGLocatableSupport$1.getX(Unknown Source) > > but the bbox itself isn't null > > what means 'Unknown Source' ? > > As Tonny said, "Unknown Source" means that you don't have debugging > information compiled in. But as to the actual problem: it sounds like > you are trying to get the bounding box but the document is running in > "static" mode (i.e., extra information about the document to allow > scripting and Java interaction hasn't been held around). > > If you are using a JSVGComponent to display your SVG, call > > myJSVGComponent.setDocumentState(JSVGComponent.ALWAYS_DYNAMIC); > > before loading your SVG document into it. > > Cameron > > -- > Cameron McCormack > | Web: http://mcc.id.au/ > | ICQ: 26955922 > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]