CSSValue v
= decl.getPropertyCSSValueInternal(CSS_ENABLE_BACKGROUND_PROPERTY);
if (v.getCssValueType() != v.CSS_VALUE_LIST) {
return null; // accumulate
}
CSSValueList l = (CSSValueList)v;
int length = l.getLength();
switch (length) {
case 1:
return CompositeGraphicsNode.VIEWPORT; // new
case 5: // new <x>,<y>,<width>,<height>
v = l.item(1);
float x = UnitProcessor.cssHorizontalCoordinateToUserSpace
(v, CSS_ENABLE_BACKGROUND_PROPERTY, uctx);
v = l.item(2);
float y = UnitProcessor.cssVerticalCoordinateToUserSpace
(v, CSS_ENABLE_BACKGROUND_PROPERTY, uctx);
v = l.item(3);
float w = UnitProcessor.cssHorizontalLengthToUserSpace
(v, CSS_ENABLE_BACKGROUND_PROPERTY, uctx);
v = l.item(4);
float h = UnitProcessor.cssVerticalLengthToUserSpace
(v, CSS_ENABLE_BACKGROUND_PROPERTY, uctx);
return new Rectangle2D.Float(x, y, w, h);
default:
// If more than zero but less than four of the values