final LayoutContext layoutContext,
final OutputProcessorMetaData metaData)
{
if (value instanceof CSSNumericValue)
{
final CSSNumericValue nval = (CSSNumericValue) value;
if (nval.getType() == CSSNumericType.PERCENTAGE)
{
// Range is between 100.000 and 0
return new RenderLength(StrictGeomUtility.toInternalValue
(nval.getValue()), true);
}
if (nval.getType() == CSSNumericType.NUMBER)
{
// Range is between 100.000 and 0
return new RenderLength(StrictGeomUtility.toInternalValue
(nval.getValue()) * 100, true);
}
final CSSNumericValue cssNumericValue =
CSSValueResolverUtility.convertLength(value, layoutContext, metaData);
// the resulting nvalue is guaranteed to have the unit PT
return new RenderLength(StrictGeomUtility.toInternalValue
(cssNumericValue.getValue()), false);
}
return RenderLength.EMPTY;
}