Class FontIcon

java.lang.Object
de.gurkenlabs.litiengine.gui.FontIcon

public class FontIcon
extends java.lang.Object
A fonticon is an class that represents a single character of an icon font.
  • Constructor Summary

    Constructors 
    ConstructorDescription
    FontIcon​(java.awt.Font font, char text)
    Instantiates a new icon.
    FontIcon​(java.awt.Font font, java.lang.String unicode) 
  • Method Summary

    Modifier and TypeMethodDescription
    java.awt.FontgetFont()
    Gets the font.
    java.lang.StringgetText()
    Gets the text.
    voidrender​(java.awt.Graphics2D g, java.awt.Color color, float fontSize, double x, double y, boolean bold)
    Render.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • FontIcon

      public FontIcon​(java.awt.Font font, char text)
      Instantiates a new icon.
      Parameters:
      font - the font
      text - the text
    • FontIcon

      public FontIcon​(java.awt.Font font, java.lang.String unicode)
  • Method Details

    • getFont

      public java.awt.Font getFont()
      Gets the font.
      Returns:
      the font
    • getText

      public java.lang.String getText()
      Gets the text.
      Returns:
      the text
    • render

      public void render​(java.awt.Graphics2D g, java.awt.Color color, float fontSize, double x, double y, boolean bold)
      Render.
      Parameters:
      g - the g
      color - the color
      fontSize - the font size
      x - the x
      y - the y
      bold - the bold