Thomas DeWeese wrote:
JAMES SHAW wrote:
Because rendering my SVG pages is quite time-consuming, I would like to cache several SVG pages in the background, and load any one of them into a JSVGCanvas.
I'm thinking I should build a GVT tree for each SVG doc, then feed that into JSVGCanvas.setGraphicsNode() (though I'm not sure exactly how to do this).
This would essentially be impossible (if you wanted your documents to retain any 'SVGness').
I don't really care what happens to the document as long as it can be rendered :-)
You could preload the SVG documents and use the setSVGDocument call to install it.
Yes, that's what I'm currently doing.
Hmm, that possibility did occur to me. Thanks, I might try it.
Is this where the majority of time is spent, or will I get little speed increase?
For most documents the majority of time is spent rendering the document the first time. You can get around this by simply instantiating multiple JSVGCanvas's. If you set the size of the canvas then when you swap it in for display the update will be essentially instantaneous.
I'll have to set zoom and pan on the canvas being swapped in to match that canvas being swapped out, but I hope that won't be too difficult.
James Shaw
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
