till varoquaux wrote:

I'm currently working (for university) on a project where I would have to display a lot of "views" of the same SVG image.
Batik is create however te only way I have found to display svg images is to pass there URL to a JSVGCanvas. This means I have to reload,reparse.. the file if I want another "view" (i.e.: a JSVGCanvas). Is there an any way to avoid that (remenber I'm a beginner).

You can build an SVGDocument using the batik.dom.svg.SAXSVGDocumentFactory class, and provide the document with the 'setSVGDocument' call. However multiple JSVGCanvas's can not share the same document (there are issues with the SVGDOM because it allows script to access the screen transform which is generally different for each canvas).

   In some cases you can get away using the GVT tree from a document
with the JGVTComponent.  These would be strictly static views of
the document (if the document changes they would not update
automatically).

Also is there a way to preload(and preparse..) the images I would want to use?

Well you can load the SVG into the DOM (as I note above). In theory you could also prebuild the GVT tree but I don't think you can easily insinuate these into the Canvas.

Sorry if my questions are really dumb... I must admit I'm rather lost.

It's a big toolkit.

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



Reply via email to