Hi Phil,

   Answer below.

> "Phil Wright" < [EMAIL PROTECTED]> wrote on 11/23/2006 02:05:36 PM:
> 
> > So I have some <path> elements in my SVG document and I want to get 
the
> bounding box.

> On 11/26/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>    You need to boot the CSS and SVG DOM's:
>          http://wiki.apache.org/xmlgraphics-batik/BootSvgAndCssDom

"Phil Wright" <[EMAIL PROTECTED]> wrote on 11/26/2006 06:52:02 PM:

> The page does say though that, "If you are using the JSVGCanvas it does 
this 
> when you associate an SVGDocument with the canvas."
> 
> Which I took to mean if I am using a JSVGCanvas, which I am, and I 
associate 
> my SVGDocument with that JSVGCanvas, which I assume that setDocument() 
does, 
> then I had already "booted"  CSS & SVG DOMs.
> 
> Is that wrong?

   No, the problem is that your SVG document is probably a
'static' SVG document (no obvious scripting).  In which 
case it doesn't boot support for the SVG DOM.  You can
fix this with the line:

        JSVGCanvas.setDocumentState(JSVGCanvas.ALWAYS_DYNAMIC) 

   Then you should be able to just call 'getBBox()' and friends,
once the document is fully loaded, and the onload event has been
dispatched.


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

Reply via email to