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 LineHeight
createFixedValue
(float value) Creates aLineHeight
with a fixed value.static LineHeight
createMultipliedValue
(float value) Creates aLineHeight
with multiplied value.static LineHeight
Creates a normalLineHeight
.float
getValue()
Returns the line height value.boolean
Check if theLineHeight
contains fixed value.boolean
Check if theLineHeight
contains multiplied value.boolean
Check if theLineHeight
contains 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
LineHeight
value.
-
createFixedValue
Creates aLineHeight
with a fixed value.- Parameters:
-
value
- value to set - Returns:
-
created
LineHeight
object
-
createMultipliedValue
Creates aLineHeight
with multiplied value. This value must be multiplied by the element's font size.- Parameters:
-
value
- value to set - Returns:
-
created
LineHeight
object
-
createNormalValue
Creates a normalLineHeight
.- Returns:
-
created
LineHeight
object
-
isFixedValue
public boolean isFixedValue()Check if theLineHeight
contains fixed value.- Returns:
-
true if
LineHeight
contains fixed value.
-
isMultipliedValue
public boolean isMultipliedValue()Check if theLineHeight
contains multiplied value.- Returns:
-
true if
LineHeight
contains multiplied value.
-
isNormalValue
public boolean isNormalValue()Check if theLineHeight
contains normal value.- Returns:
-
true if
LineHeight
is normal.
-