Class LengthValue
- java.lang.Object
-
- com.openhtmltopdf.css.style.DerivedValue
-
- com.openhtmltopdf.css.style.derived.LengthValue
-
- All Implemented Interfaces:
FSDerivedValue
public class LengthValue extends DerivedValue
-
-
Constructor Summary
Constructors Constructor Description LengthValue(CalculatedStyle style, CSSName name, PropertyValue value)
-
Method Summary
Modifier and Type Method Description floatasFloat()static floatcalcFloatProportionalValue(CalculatedStyle style, CSSName cssName, String stringValue, float relVal, short primitiveType, float baseValue, CssContext ctx)floatgetFloatProportionalTo(CSSName cssName, float baseValue, CssContext ctx)Computes a relative unit (e.g.booleanhasAbsoluteUnit()booleanisDependentOnFontSize()-
Methods inherited from class com.openhtmltopdf.css.style.DerivedValue
asColor, asIdentValue, asString, asStringArray, getCssSacUnitType, getStringValue, isAbsoluteUnit, isDeclaredInherit, isIdent
-
-
-
-
Constructor Detail
-
LengthValue
public LengthValue(CalculatedStyle style, CSSName name, PropertyValue value)
-
-
Method Detail
-
asFloat
public float asFloat()
- Specified by:
asFloatin interfaceFSDerivedValue- Overrides:
asFloatin classDerivedValue
-
getFloatProportionalTo
public float getFloatProportionalTo(CSSName cssName, float baseValue, CssContext ctx)
Computes a relative unit (e.g. percentage) as an absolute value, using the input value. Used for such properties whose parent value cannot be known before layout/render- Specified by:
getFloatProportionalToin interfaceFSDerivedValue- Overrides:
getFloatProportionalToin classDerivedValue- Parameters:
cssName- Name of the propertybaseValue-ctx-- Returns:
- the absolute value or computed absolute value
-
hasAbsoluteUnit
public boolean hasAbsoluteUnit()
- Specified by:
hasAbsoluteUnitin interfaceFSDerivedValue- Overrides:
hasAbsoluteUnitin classDerivedValue
-
isDependentOnFontSize
public boolean isDependentOnFontSize()
- Specified by:
isDependentOnFontSizein interfaceFSDerivedValue- Overrides:
isDependentOnFontSizein classDerivedValue
-
calcFloatProportionalValue
public static float calcFloatProportionalValue(CalculatedStyle style, CSSName cssName, String stringValue, float relVal, short primitiveType, float baseValue, CssContext ctx)
-
-