[EMAIL PROTECTED] wrote:
Hi gang,

this is driving me nuts ;o( Once you have passed a SVG document to the
ImageTranscoder, modifying the 'visibility'-attributes has no impact
anymore on the transcoder output. It only has impact on the output when
you modify the attributes before passing the document object the first
time.

I know there are some points to remember when using JSVGCanvas [ see
http://koala.ilog.fr/batik/mlists/batik-users/archives/msg03051.html ],
however I can't seem to find the reason for this odd behaviour when
using the ImageTranscoder.

Here is a modified DOMRasterizer-Example taken from Batik's website to
illustrate the problem (see source comments for more information)

Any ideas or workarounds ?

The problem is that the Transcoder was not cleaning out the ViewCSS it associated with the Document, and since it wasn't constructed in a dynamic context the ViewCSS wasn't updated as the DOM changed (visibility is a CSS property so the value comes from the ViewCSS). Fortunately the fix is very simple, add the following at: xml-batik/sources/org/apache/batik/transcoder/SVGAbstractTranscoder.java:299

   this.root = gvtRoot;
+  ctx.dispose
}

  This should be the last line of:
    protected void transcode(Document document,
                             String uri,
                             TranscoderOutput output)

I'll commit this to CVS later tonight.





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to