/**
* <b>DOM</b>: Implements {@link
* org.w3c.flex.forks.dom.svg.SVGPaint#getPaintType()}.
*/
public short getPaintType() {
Value value = valueProvider.getValue();
switch (value.getCssValueType()) {
case CSSValue.CSS_PRIMITIVE_VALUE:
switch (value.getPrimitiveType()) {
case CSSPrimitiveValue.CSS_IDENT: {
String str = value.getStringValue();
if (str.equalsIgnoreCase(CSSConstants.CSS_NONE_VALUE)) {
return SVG_PAINTTYPE_NONE;
} else if (str.equalsIgnoreCase
(CSSConstants.CSS_CURRENTCOLOR_VALUE)) {
return SVG_PAINTTYPE_CURRENTCOLOR;
}
return SVG_PAINTTYPE_RGBCOLOR;
}
case CSSPrimitiveValue.CSS_RGBCOLOR:
return SVG_PAINTTYPE_RGBCOLOR;
case CSSPrimitiveValue.CSS_URI:
return SVG_PAINTTYPE_URI;
}
break;
case CSSValue.CSS_VALUE_LIST:
Value v0 = value.item(0);
Value v1 = value.item(1);
switch (v0.getPrimitiveType()) {
case CSSPrimitiveValue.CSS_IDENT:
return SVG_PAINTTYPE_RGBCOLOR_ICCCOLOR;
case CSSPrimitiveValue.CSS_URI:
if (v1.getCssValueType() == CSSValue.CSS_VALUE_LIST)
// Should probably check this more deeply...
return SVG_PAINTTYPE_URI_RGBCOLOR_ICCCOLOR;
switch (v1.getPrimitiveType()) {
case CSSPrimitiveValue.CSS_IDENT: {
String str = v1.getStringValue();
if (str.equalsIgnoreCase(CSSConstants.CSS_NONE_VALUE)) {
return SVG_PAINTTYPE_URI_NONE;
} else if (str.equalsIgnoreCase
(CSSConstants.CSS_CURRENTCOLOR_VALUE)) {
return SVG_PAINTTYPE_URI_CURRENTCOLOR;