switch (lu.getLexicalUnitType()) {
case LexicalUnit.SAC_INHERIT:
return SVGValueConstants.INHERIT_VALUE;
case LexicalUnit.SAC_DEGREE:
return new FloatValue(CSSPrimitiveValue.CSS_DEG,
lu.getFloatValue());
case LexicalUnit.SAC_GRADIAN:
return new FloatValue(CSSPrimitiveValue.CSS_GRAD,
lu.getFloatValue());
case LexicalUnit.SAC_RADIAN:
return new FloatValue(CSSPrimitiveValue.CSS_RAD,
lu.getFloatValue());
// For SVG angle properties unit defaults to 'deg'.
case LexicalUnit.SAC_INTEGER:
{
int n = lu.getIntegerValue();
return new FloatValue(CSSPrimitiveValue.CSS_DEG, n);
}
case LexicalUnit.SAC_REAL:
{
float n = lu.getFloatValue();
return new FloatValue(CSSPrimitiveValue.CSS_DEG, n);
}
}
throw createInvalidLexicalUnitDOMException(lu.getLexicalUnitType());
}