Hi,

Intro: I just started using Batik and I'm relatively new to Java. I'm
using both in Netbeans 6.5. ;-)

Using Batik went quite well so far but I can't seem to figure one
thing out. I hope you can help me out.

Example 1: <circle id="test" cx="25" cy="25" r="20"
style="opacity:0;fill:blue"/>
Example 2: <circle id="test" cx="25" cy="25" r="20" opacity="0"
style="fill:blue"/>

(note the difference in specifying the opacity styling property)

In case of example 1, the following has no effect on the visibility to
the circle while it works as expected (the circle becomes visible) on
example 2:

Element circle = svgDoc.getElementById("test");
circle.setAttributeNS(null, "opacity", "1");

Should this be considered a bug? Shouldn't the CSS property be
overwritten by setting the presentation attribute?
I wasn't able to find anything about style method priority in the SVG
specs but it would seem logical to me that the last set method should
be the one that's used.

Unfortunately I don't have any control over the property style being
used in the SVG file I get. Since more properties could be included in
the style attribute, is it possible to change just the one CSS
property without having to do string (followed by attribute)
replacements on the style attribute? Basically kind of like it's
possible in JavaScript (element.style.property = ...). I was of the
opinion that this was possible in Batik but I can't seem to find out
how.

Yours,

Age Bosma

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to