xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Julien Beghin <minimoi1...@hotmail.com>
Subject RE: Partial Refresh
Date Fri, 16 Jul 2010 13:09:29 GMT

Hi Thomas,

 

I should be missing a thing...

I am using a SVGCanavas Class, extending "JSVGCanvas" that contains the following -> setDocumentState(JSVGCanvas.ALWAYS_DYNAMIC);


So I assume that it keep the always dynamic status during the execution.

 

All our graphic operations are done in updatemanager :

 

updateManager.getUpdateRunnableQueue().invokeLater(new Runnable()
{
     public void run()
   {

         // Code done here

   }

}

 

Basically we are getting org.w3c.dom.Element and we use setAttribute to modify SVG contents...

 

It seems OK for most of our application.

 

Also, our SVG contains patterns like this : 

<path xmlns:math="http://exslt.org/math" fill="none" d="M386.25,462.50 L386.25,457.50"
stroke-width="0.20" stroke="rgb(0,0,0)"/>
<defs>
     <pattern width="12.5000" xmlns:xlink="http://www.w3.org/1999/xlink" patternUnits="userSpaceOnUse"
xlink:type="simple" xlink:actuate="onLoad" id="Autres_fluides_04db74e9-a2aa-      46d1-ab9c-6684fed4a84d"
viewBox="0.00000 -1.27500 25.0000 2.55000" height="2.55000" preserveAspectRatio="xMidYMid
meet" xlink:show="other" overflow="hidden">
           <path fill="rgb(0,0,0)" d="M 10.0 -2.5 L 10.0 2.5 L 15.0 2.5 L 15.0 -2.5 z"
stroke-width="0.100000" stroke="rgb(0,0,0)"/>
      </pattern>
</defs>

 

 

When this pattern is updated the result is not displayed ( if I do "getSvgCanvas().setSVGDocument(svgDoc);"
result is OK, but that is not a good way to work... )

Node referencing the pattern with fill="url(#Autres_fluides_04db74e9...)" are not OK in the
canvas...

 

 

Is there a specific way to implement the modification ?

 

 



To: batik-users@xmlgraphics.apache.org
CC: batik-users@xmlgraphics.apache.org
Subject: Re: Partial Refresh
From: thomas.deweese@kodak.com
Date: Fri, 16 Jul 2010 06:16:59 -0400

Hi Julien, 

Julien Beghin <minimoi1234@hotmail.com> wrote on 07/13/2010 06:05:14 AM:

> I still experience some refresh  "bugs" in my application.

   This means that either your canvas is not set to 'dynamic' or 
that you are not making your modifications in the UpdateManager's 
runnable queue.  I'm betting on the latter. 

> We added a refresh at the end :
> svgPanel.getSvgCanvas().setRenderingTransform(svgPanel.getSvgCanvas
> ().getRenderingTransform());

   If you need to do this then you are modifying the document 
incorrectly.  Batik will update the canvas automatically if you 
follow the rules.

 		 	   		  
_________________________________________________________________
Le nouveau Hotmail est presque arrivé, ne le manquez pas !
http://www.windowslive.fr/nouveau-hotmail/
Mime
View raw message