public class LengthValue extends DerivedValue
Constructor and Description |
---|
LengthValue(CalculatedStyle style,
CSSName name,
PropertyValue value) |
Modifier and Type | Method and Description |
---|---|
float |
asFloat() |
static float |
calcFloatProportionalValue(CalculatedStyle style,
CSSName cssName,
String stringValue,
float relVal,
short primitiveType,
float baseValue,
CssContext ctx) |
float |
getFloatProportionalTo(CSSName cssName,
float baseValue,
CssContext ctx)
Computes a relative unit (e.g.
|
boolean |
hasAbsoluteUnit() |
boolean |
isDependentOnFontSize() |
asColor, asIdentValue, asString, asStringArray, getCssSacUnitType, getStringValue, isAbsoluteUnit, isDeclaredInherit, isIdent
public LengthValue(CalculatedStyle style, CSSName name, PropertyValue value)
public float asFloat()
asFloat
in interface FSDerivedValue
asFloat
in class DerivedValue
public float getFloatProportionalTo(CSSName cssName, float baseValue, CssContext ctx)
getFloatProportionalTo
in interface FSDerivedValue
getFloatProportionalTo
in class DerivedValue
cssName
- Name of the propertybaseValue
- ctx
- public boolean hasAbsoluteUnit()
hasAbsoluteUnit
in interface FSDerivedValue
hasAbsoluteUnit
in class DerivedValue
public boolean isDependentOnFontSize()
isDependentOnFontSize
in interface FSDerivedValue
isDependentOnFontSize
in class DerivedValue
public static float calcFloatProportionalValue(CalculatedStyle style, CSSName cssName, String stringValue, float relVal, short primitiveType, float baseValue, CssContext ctx)
Copyright © 2017. All rights reserved.