Interface Font
-
Method Summary
Modifier and TypeMethodDescriptionvoid
drawString
(float x, float y, String text) Draw a string to the screenvoid
drawString
(float x, float y, String text, Color col) Draw a string to the screenvoid
drawString
(float x, float y, String text, Color col, int startIndex, int endIndex) Draw part of a string to the screen.int
get the height of the given stringint
get the maximum height of any line drawn by this fontint
get the width of the given stringint
int
int
-
Method Details
-
drawString
Draw a string to the screen- Parameters:
x
- The x location at which to draw the stringy
- The y location at which to draw the stringtext
- The text to be displayed
-
drawString
-
drawString
Draw part of a string to the screen. Note that this will still position the text as though it's part of the bigger string.- Parameters:
x
- The x location at which to draw the stringy
- The y location at which to draw the stringtext
- The text to be displayedcol
- The colour to draw withstartIndex
- The index of the first character to drawendIndex
- The index of the last character from the string to draw
-
getHeight
get the height of the given string- Parameters:
str
- The string to obtain the rendered with of- Returns:
- The width of the given string
-
getWidth
get the width of the given string- Parameters:
str
- The string to obtain the rendered with of- Returns:
- The width of the given string
-
getWidth
-
getWidth
-
getWidth
-
getLineHeight
int getLineHeight()get the maximum height of any line drawn by this font- Returns:
- The maxium height of any line drawn by this font
-