public enum SpaceUnit extends Enum<SpaceUnit>
| Enum Constant and Description |
|---|
em
The average character width of the associated font.
|
pt
Measuring in points.
|
| Modifier and Type | Method and Description |
|---|---|
float |
toPt(float size,
FontDescriptor fontDescriptor)
Converts the given unit to pt.
|
static SpaceUnit |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static SpaceUnit[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final SpaceUnit em
public static final SpaceUnit pt
public static SpaceUnit[] values()
for (SpaceUnit c : SpaceUnit.values()) System.out.println(c);
public static SpaceUnit valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic float toPt(float size,
FontDescriptor fontDescriptor)
throws IOException
size - the size with respect to the unit.fontDescriptor - the font/size to use.IOException - by pdfboxCopyright © 2022. All rights reserved.