You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by th...@sympatico.ca on 2009/06/02 05:13:45 UTC
RE: Batik stress testing
> Note that you haven't provided most of the information asked for
> (hardware and software environments, goal, etc.): partial response in
> accordance... :-|
It is a Presario laptop, CPU 1.79 GHz, RAM 1G. Windows XP/SP3. Java 1.6.0_11. Batik 1.7.
> Have you tried suspending the rendering (before entering the "for"
> loop) as suggested in my previous message?
Yes. But it does not improve the performance.
> It depends on what you intend. As already stated, moving rectangles
> has a purpose of testing something which might be accomplished in a
> completely different way...
>
The long term goal is to do graphics streaming, if the rendering speed is really fast enough.
RE: Differences between JSVGCanvas.setDocument() and
JSVGCanvas.loadSVGDocument()
Posted by th...@sympatico.ca.
>Don't set the document until after the canvas has been
>added to the swing tree and packed.
An excellent advice. That fixed the problem. Thanks.
Re: Differences between JSVGCanvas.setDocument() and
JSVGCanvas.loadSVGDocument()
Posted by Abraham Rodriguez Mota <ab...@gmail.com>.
Hi,
I agree with Thomas.
But If you don't have problems creating a composite with a fix size and then
resize it as soon as the svg document has been loaded on the JSVGCanvas, you
can add a GVTTreeBuilderListener to your instance of the JSVGCanvas, and
resize the container as part of the gvtBuildCompleted method of the
listener.
Hope this helps
Abraham
On Tue, Jun 2, 2009 at 5:16 AM, <th...@sympatico.ca> wrote:
> I build a DOM on the fly and do this:
>
> //myDoc that has been built on the fly.
>
> myJSVGCanvas.setDocument(myDoc);
>
> //Add the myJSVGCanvas into a JSVGScrollPane, add the JSVGScrollPane into a
> JPanel, and display it in a JFrame.
>
> No matter how I resize the frame, the scroll bars will never show up.
>
> But if I save the myDoc into a file after I build the doc and load the file
> back to the myJSVGCanvas, scrolling works like a charm. Something like this:
>
> //The same myDoc is saved to a file at theFilePath.
>
> myJSVGCanvas.loadSVGDocument(theFilePath)
>
> //The rest is same as the above.
>
>
> How can I make the former work?
>
>
>
Re: Differences between JSVGCanvas.setDocument() and JSVGCanvas.loadSVGDocument()
Posted by th...@kodak.com.
Hi The.Networker,
<th...@sympatico.ca> wrote on 06/02/2009 12:16:57 AM:
> I build a DOM on the fly and do this:
>
> //myDoc that has been built on the fly.
>
> myJSVGCanvas.setDocument(myDoc);
>
> //Add the myJSVGCanvas into a JSVGScrollPane, add the JSVGScrollPane
> into a JPanel, and display it in a JFrame.
> No matter how I resize the frame, the scroll bars will never show up.
Don't set the document until after the canvas has been
added to the swing tree and packed. Without a sample app I
can't say for certain but in general setting the document
before the canvas is in the swing hierarchy is bad.
> But if I save the myDoc into a file after I build the doc and load
> the file back to the myJSVGCanvas, scrolling works like a charm.
You could also have some brokeness in namespaces, etc.
Which tend to be fixed by writing to disk and reading back.
>
Differences between JSVGCanvas.setDocument() and
JSVGCanvas.loadSVGDocument()
Posted by th...@sympatico.ca.
I build a DOM on the fly and do this:
//myDoc that has been built on the fly.
myJSVGCanvas.setDocument(myDoc);
//Add the myJSVGCanvas into a JSVGScrollPane, add the JSVGScrollPane into a JPanel, and display it in a JFrame.
No matter how I resize the frame, the scroll bars will never show up.
But if I save the myDoc into a file after I build the doc and load the file back to the myJSVGCanvas, scrolling works like a charm. Something like this:
//The same myDoc is saved to a file at theFilePath.
myJSVGCanvas.loadSVGDocument(theFilePath)
//The rest is same as the above.
How can I make the former work?