Hello!

I'm using batik1.7 on linux with sun java 1.6.0.12 and encountered the
following problem:

As a simple testcase I'll use the SVG
http://www.w3.org/TR/SVG/images/text/toap01.svg
and add an id to the textPath in line 17:
<textPath id="test" xlink:href="#MyPath">

This file should be displayed in a JSVGCanvas and the textPath tag
should be dynamically changed from Java the following way:

------------------------------------------

svgCanvas.getUpdateManager().getUpdateRunnableQueue().
invokeLater(new Runnable()
{
    public void run()
    {
        SVGSVGElement svg = svgCanvas.getSVGDocument().getRootElement();
        SVGTextPathElement elm = (SVGTextPathElement)svg.getElementById("test");
        elm.setAttributeNS(null, "startOffset", "50%");
    }
});

------------------------------------------

The problem is that the JSVGCanvas doesn't update the display. If I
replace "startOffset" with for example "font-size" it works perfectly.
If the whole document is rerendered (i.e. calling "setSVGDocument"
again) the result is also correct. Therefore I think there must be 
something wrong with the handling of DOM changes to the "startOffset"
attribute. 

Moreover this bug seems to be similar to bug #45723 (startOffset
attribute of textPath cannot be animated).

To make it easier for you to reproduce the bug I've appended the SVG and
a small application based on an example from the batik homepage. In this
application you can load the SVG and then press the Start! button to
execute the code above.

Does it work for you?

Kind regards,
Sebastian

Attachment: test-src.tar.gz
Description: Binary data

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

Reply via email to