Class FontIcon
java.lang.Object
de.gurkenlabs.litiengine.gui.FontIcon
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetFont()Returns the font used to render the icon.getText()Returns the text or unicode character to be rendered as the icon.voidrender(Graphics2D g, Color color, float fontSize, double x, double y, boolean bold) Renders the icon using the specified graphics context, color, font size, and position.
-
Constructor Details
-
FontIcon
Constructs a FontIcon with the specified font and character.- Parameters:
font- the font used to render the icontext- the character to be rendered as the icon
-
FontIcon
-
-
Method Details
-
getFont
Returns the font used to render the icon.- Returns:
- the font used to render the icon
-
getText
Returns the text or unicode character to be rendered as the icon.- Returns:
- the text or unicode character to be rendered as the icon
-
render
Renders the icon using the specified graphics context, color, font size, and position.- Parameters:
g- the graphics context to use for renderingcolor- the color to render the iconfontSize- the size of the font to render the iconx- the x-coordinate where the icon should be renderedy- the y-coordinate where the icon should be renderedbold- true if the font should be bold, false otherwise
-