xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Julien Beghin <minimoi1...@hotmail.com>
Subject Partial Refresh
Date Tue, 13 Jul 2010 10:05:14 GMT

Hello all,

 

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

 

I have a (quite big) SVG, that I am trying to update in my application.

The modification consists in setting all colored stuff in the SVG to black fill and stroke.

 

So (part of) what we are doing for now is : 

 

for (int j = 0; j < eltPattern.getChildNodes().getLength(); j++) {
     Node temp = eltPattern.getChildNodes().item(j);
     if(temp instanceof Element){
           String strokeAttribute = ((Element)temp).getAttribute(SVGConstants.SVG_STROKE_ATTRIBUTE);
          if(strokeAttribute.equals(refColor)){
               ((Element)temp).setAttribute(SVGConstants.SVG_STROKE_ATTRIBUTE, colorsPattern.get(i));
          }
          String fillAttribute = ((Element)temp).getAttribute(SVGConstants.SVG_FILL_ATTRIBUTE);
          if(fillAttribute.equals(refColor)){
               ((Element)temp).setAttribute(SVGConstants.SVG_FILL_ATTRIBUTE, colorsPattern.get(i));
          }
     }
}

 

 

 

We added a refresh at the end :

svgPanel.getSvgCanvas().setRenderingTransform(svgPanel.getSvgCanvas().getRenderingTransform());

 

 

The modification is not correctly displayed in our canvas, but when I look at the exported
SVG, via Squiggle, the result is OK.

 

Do someone know where my problem can come from

 

(I am using batik 1.8pre and I just added xmlgraphic 1.4, just in case...)

 

I Joined pictures of what is see too....

 

 

This is going to run my brain out :'(

 
 		 	   		  
_________________________________________________________________
Exclu : Téléchargez la nouvelle version de Messenger !
http://clk.atdmt.com/FRM/go/244627952/direct/01/
Mime
View raw message