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 16:55:26 GMT

Hi Dao, and thanks for reading about my problems.

 

I tried to change this by setting setAttribute("xlink:actuate","none") and setAttribute("xlink:actuate","onRequest")
but nothing more happens...

 

Couldn't this come from the fact that the pattern is identifed by its url for other elements
of the SVG ?

 

I mean maybe the pattern is changed when I modify its attributes, but what about the elements
using it ? Are they supposed to be refreshed by Batik ?

 

I thought we were respecting all Batik prescription when setting the canvas as Dynamic and
using the runnable queue... but I must have missed a thing ...


 


Date: Fri, 16 Jul 2010 16:19:05 +0200
Subject: Re: Partial Refresh
From: dao.hodac@gmail.com
To: batik-users@xmlgraphics.apache.org

perhaps it is because you specified xlink:actuate="onLoad" in the pattern attributes...


On Fri, Jul 16, 2010 at 3:09 PM, Julien Beghin <minimoi1234@hotmail.com> wrote:


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 Messenger arrive ! Téléchargez-le gratuitement et découvrez ses nouvelles fonctionnalités

-- 
Dao Hodac
 		 	   		  
_________________________________________________________________
Découvrez Microsoft Security Essentials, l'antivirus gratuit par Microsoft
http://clk.atdmt.com/FRM/go/212688364/direct/01/
Mime
View raw message