Constructor and Description |
---|
TextUtil() |
Modifier and Type | Method and Description |
---|---|
static Rectangle |
getStringBaselineRect(String inString,
Font inFont)
Calculate the bounding rectangle for the specified string and font where the bottom of the
rectangle is at the baseline and using the default of 96 ppi.
|
static Rectangle |
getStringBaselineRect(String inString,
Font inFont,
DisplayPPI inPPI)
Calculate the bounding rectangle for the specified string and font where the bottom of the
rectangle is at the baseline.
|
static Rectangle |
getStringRect(String inString,
Font inFont)
Calculate the bounding rectangle for the specified string and font using the default of 96 ppi.
|
static Rectangle |
getStringRect(String inString,
Font inFont,
DisplayPPI inPPI)
Calculate the bounding rectangle for the specified string and font.
|
public TextUtil()
public static Rectangle getStringRect(String inString, Font inFont)
inString
- the text for which to calculate the bounding rectangleinFont
- the text for which to calculate the bounding rectanglepublic static Rectangle getStringRect(String inString, Font inFont, DisplayPPI inPPI)
inString
- the text for which to calculate the bounding rectangleinFont
- the text for which to calculate the bounding rectanglepublic static Rectangle getStringBaselineRect(String inString, Font inFont)
inString
- the text for which to calculate the bounding rectangleinFont
- the text for which to calculate the bounding rectanglepublic static Rectangle getStringBaselineRect(String inString, Font inFont, DisplayPPI inPPI)
inString
- the text for which to calculate the bounding rectangleinFont
- the text for which to calculate the bounding rectangleinPPI
- the pixels per inch of the display device