Alexander Maier wrote:
When I load the file via JSVGCanvas.setURI(String) method, the document is loaded, parsed and rendered. But exactly when the image is diplayed it dissapears and the rendering starts again. This occurs over and over. Does anyone have a clue?

My guess is that when you set the label to "" the size of the JSVGCanvas changes, and so it rerenders it's contents to match the new size (which causes the size to change, so it rerenders it's contents to match the new size (which causes ....)).

   I think if you are more careful to ensure that changes to the
label don't cause changes to the JSVGCanvas you will be ok.

   You can actually 'short cut' this behaviour of the canvas,  If
you want to see an example you can look at the
contrib/scroll/ScrollExample it does this.

       svgCanvas.addGVTTreeRendererListener(new GVTTreeRendererAdapter() {
           public void gvtRenderingPrepare(GVTTreeRendererEvent e) {
               label.setText("Rendering Started...");
           }

           public void gvtRenderingCompleted(GVTTreeRendererEvent e) {
               label.setText("");
           }
       });
   }
}





---------------------------------------------------------------------
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]



Reply via email to