Package com.itextpdf.layout.properties
Class Leading
java.lang.Object
com.itextpdf.layout.properties.Leading
A specialized class that specifies the leading, "the vertical distance between the baselines of adjacent lines of text" (ISO-32000-1, section 9.3.5). Allows to use either an absolute (constant) leading value, or one determined by font size. Pronounce as 'ledding' (cfr. Led Zeppelin). This class is meant to be used as the value for the
Property.LEADING
key in an IPropertyContainer
.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
A leading type independent of font size.static final int
A leading type related to the font size and the resulting bounding box.protected int
protected float
-
Constructor Summary
-
Method Summary
-
Field Details
-
FIXED
public static final int FIXEDA leading type independent of font size.- See Also:
-
MULTIPLIED
public static final int MULTIPLIEDA leading type related to the font size and the resulting bounding box.- See Also:
-
type
protected int type -
value
protected float value
-
-
Constructor Details
-
Leading
public Leading(int type, float value) Creates a Leading object.- Parameters:
-
type
- a constant type that defines the calculation of actual leading distance. EitherFIXED
orMULTIPLIED
-
value
- to be used as a basis for the leading calculation.
-
-
Method Details
-
getType
public int getType()Gets the calculation type of the Leading object.- Returns:
-
the calculation type. Either
FIXED
orMULTIPLIED
-
getValue
public float getValue()Gets the value to be used as the basis for the leading calculation.- Returns:
- a calculation value
-
equals
-
hashCode
public int hashCode()
-