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 "F.Bayliss" <ba...@alcatel-lucent.com> on 2009/01/20 13:56:04 UTC

Another SVGCanvas redraw problem

Hello,

I've spent some time reading the mail archive and I just don't get it. 
I'm updating the SVGDocument be finding the SVGUseElement with a 
specific ID. I'm changing the 'style' attribute to change the look of 
the object. If I then do a svgCanvas.setDocument(doc) I see the change. 
I know from reading the archives this is not what I want to do because 
it is slow but I can't find any other method that seems to force the 
canvas to redraw the change. I'm sure there is and I'm hoping someone 
can give me an answer.

thanks
Frank



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


AW: Another SVGCanvas redraw problem

Posted by Kerschbaum Michael <m....@pke.at>.
Hello,

You must use the Updatemanager, otherwise you will get problems of synchronisation !

Eg...


if (ag.getUpdateManager() != null) {
	ag.getUpdateManager().getUpdateRunnableQueue().invokeLater(
				new Runnable() {
					public void run() {
						layerManager.setOverlayVisibility(overlayNames, visibility);
					}
				});
} else {
	// Without UpdateManager --> set layer visibility directly
	layerManager.setOverlayVisibility(overlayNames, visibility);
}

In this case the SVGDocument is searched for elements that should be displayed or not.. Depending on the layernames and the visibility flag...

Changing something in the svgdocument should only be made within the updatemanager... ! I had a lot of problems with that because i always get a ConcurrentModification Exception and after that you can't load new documents !!

Mit freundlichen Grüßen Michael Kerschbaum



-----Ursprüngliche Nachricht-----
Von: Simon Mittermüller [mailto:simon.mittermueller@googlemail.com] 
Gesendet: Montag, 26. Jänner 2009 10:16
An: batik-users@xmlgraphics.apache.org
Betreff: Re: Another SVGCanvas redraw problem

Hi,

maybee, try the UpdateManager

See the FAQs for further details.
http://xmlgraphics.apache.org/batik/faq.html

On 20. Jan 2009, at 13:56 , F.Bayliss wrote:

> Hello,
>
> I've spent some time reading the mail archive and I just don't get it. 
> I'm updating the SVGDocument be finding the SVGUseElement with a 
> specific ID. I'm changing the 'style' attribute to change the look of 
> the object. If I then do a svgCanvas.setDocument(doc) I see the 
> change. I know from reading the archives this is not what I want to do 
> because it is slow but I can't find any other method that seems to 
> force the canvas to redraw the change. I'm sure there is and I'm 
> hoping someone can give me an answer.
>
> thanks
> Frank
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: 
> batik-users-help@xmlgraphics.apache.org
>


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


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


Re: Another SVGCanvas redraw problem

Posted by Simon Mittermüller <si...@googlemail.com>.
Hi,

maybee, try the UpdateManager

See the FAQs for further details.
http://xmlgraphics.apache.org/batik/faq.html

On 20. Jan 2009, at 13:56 , F.Bayliss wrote:

> Hello,
>
> I've spent some time reading the mail archive and I just don't get  
> it. I'm updating the SVGDocument be finding the SVGUseElement with a  
> specific ID. I'm changing the 'style' attribute to change the look  
> of the object. If I then do a svgCanvas.setDocument(doc) I see the  
> change. I know from reading the archives this is not what I want to  
> do because it is slow but I can't find any other method that seems  
> to force the canvas to redraw the change. I'm sure there is and I'm  
> hoping someone can give me an answer.
>
> thanks
> Frank
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
>


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