Element paintedElement,
GraphicsNode paintedNode,
float opacity) {
CSSOMReadOnlyStyleDeclaration decl;
decl = CSSUtilities.getComputedStyle(paintElement);
CSSValue opacityVal = decl.getPropertyCSSValueInternal
(BATIK_EXT_SOLID_OPACITY_PROPERTY);
if (opacityVal != null) {
float attr = PaintServer.convertOpacity(opacityVal);
opacity *= attr;
}
CSSValue colorDef
= decl.getPropertyCSSValueInternal(BATIK_EXT_SOLID_COLOR_PROPERTY);
if (colorDef == null)
return new Color(0f, 0f, 0f, opacity);
Color ret = null;
if (colorDef.getCssValueType() == CSSValue.CSS_PRIMITIVE_VALUE) {
CSSPrimitiveValue v = (CSSPrimitiveValue)colorDef;
ret = PaintServer.convertColor(v.getRGBColorValue(), opacity);
} else {
ret = PaintServer.convertRGBICCColor
(paintElement, (SVGColor)colorDef, opacity, ctx);