Package com.itextpdf.layout.properties
Class LineHeight
java.lang.Object
com.itextpdf.layout.properties.LineHeight
A property corresponding to the css line-height property and used to set the height of a line box in the HTML mode. On block-level elements, it specifies the minimum height of line boxes within the element. On non-replaced inline elements, it specifies the height that is used to calculate line box height.
-
Method Summary
Modifier and TypeMethodDescriptionstatic LineHeightcreateFixedValue(float value) Creates aLineHeightwith a fixed value.static LineHeightcreateMultipliedValue(float value) Creates aLineHeightwith multiplied value.static LineHeightCreates a normalLineHeight.floatgetValue()Returns the line height value.booleanCheck if theLineHeightcontains fixed value.booleanCheck if theLineHeightcontains multiplied value.booleanCheck if theLineHeightcontains normal value.
-
Method Details
-
getValue
public float getValue()Returns the line height value. The meaning of the returned value depends on the type of line height.- Returns:
-
the
LineHeightvalue.
-
createFixedValue
Creates aLineHeightwith a fixed value.- Parameters:
-
value- value to set - Returns:
-
created
LineHeightobject
-
createMultipliedValue
Creates aLineHeightwith multiplied value. This value must be multiplied by the element's font size.- Parameters:
-
value- value to set - Returns:
-
created
LineHeightobject
-
createNormalValue
Creates a normalLineHeight.- Returns:
-
created
LineHeightobject
-
isFixedValue
public boolean isFixedValue()Check if theLineHeightcontains fixed value.- Returns:
-
true if
LineHeightcontains fixed value.
-
isMultipliedValue
public boolean isMultipliedValue()Check if theLineHeightcontains multiplied value.- Returns:
-
true if
LineHeightcontains multiplied value.
-
isNormalValue
public boolean isNormalValue()Check if theLineHeightcontains normal value.- Returns:
-
true if
LineHeightis normal.
-