I'm trying to vary the opactity of SVGElements with .setAttribute() and while it works fine with "opacity" on some elements, on others only "fill-opacity" seems to work -- but I can't see the pattern. I don't think it has to do with grouping. I'd like to use "opacity" for all elements.

Also I've tried setting the opacity of SVGElements using computed style:

private void setCSSOpacity(float o)
    {
        // we get NPEs here for some elements
        CSSOMValue ov = (CSSOMValue)((ViewCSS)svg.getDocumentElement()).getComputedStyle(element, null).getPropertyCSSValue("opacity");
        Logger.getLogger("debug").info("Opacity CSS:"+ov);
        // this creates a DOMException
        ov.setFloatValue(CSSPrimitiveValue.CSS_NUMBER, o);
    }

but I get a DOMException on trying to set the value of the computed CSS opacity.



 

[EMAIL PROTECTED]
http://www.digiverse.net
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to