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 Patrick Egan <pa...@greshamticket.com> on 2005/07/20 17:07:27 UTC

Re: flushing image on JSVGCanvas

Hi Chandra,

I think that the JSVGCanvas should only be accessed from the Swing event thread.
Have you tried your code outside of the UpdateManager queue ? 

Patrick

chandra srinivasan wrote:

>
>
> Hi
>
> I am using a JSVGCanvas to load multiple svg files one after the 
> other.The svgCanvas object is contained within a JSVGScrollPane.In 
> addition to the svgCanvas object the scrollpane has a JPanel added to 
> it's West. before I load a new svg file, I try to clear the the cached 
> image from JSVGCanvas by calling
>  
> pane.hide();
> svgCanvas.getUpdateManager().getUpdateRunnableQueue().invokeLater(new 
> Runnable() {
>         public void run() {
>                svgCanvas.flush() ;
>                svgCanvas.flushImageCache();
>                svgCanvas.setSVGDocument(null);
>         }
>  }
> but many times the canvas doesn't clear the image and holds on to the 
> previously loaded image.
> I tried putting the panel.hide(); inside the updatethread, before as 
> well as after the setSVGDocument statement. but it didn't help.
>  is there any sure shot way of clearing the cached image within a 
> svgCanvas?
>  
> Thanks a bunch
> Chandra Srinivasan
> --------------------------------------------------------------------- 
> To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org 
> For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org 



Important - This e-mail and the information that it contains may be
confidential, legally privileged and protected by law.  Access by the
intended recipient only is authorised.  Any liability (in negligence or
otherwise) arising from any third party acting, or refraining from acting,
on any information contained in this e-mail is hereby excluded.  If you are
not the intended recipient, please notify the sender immediately and do not
disclose the contents to any other person, use it for any purpose, or store
or copy the information in any medium.  Copyright in this e-mail and
attachments created by us belongs to the author and
also asserts the right to be identified as such and object to any misuse.

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org