Package ej.microui.display

## Class RenderableString

- java.lang.Object
- - ej.microui.display.RenderableString

-     public class RenderableString
      extends Object

  Represents graphical information related to the drawing of a string with a font.

  Drawing a renderable string is faster than drawing a regular string. This optimization is done by caching the index within the font of every character of the string as soon as the renderable string is created. However a `RenderableString` consumes significant heap memory.

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `RenderableString​(String string, Font font)` | Creates a renderable string.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `Font` | `getFont()` | Returns the font associated with this renderable string.
    `int` | `getHeight()` | Returns the height of the graphical bounds of this renderable string.
    `String` | `getString()` | Returns the string associated with this renderable string.
    `int` | `getWidth()` | Returns the width of the graphical bounds of this renderable string.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### RenderableString

          public RenderableString​(String string,
                                  Font font)

      Creates a renderable string.
      Parameters:
        `string` - the string to draw.
        `font` - the font to use in order to draw the string.

  - ### Method Detail

    - #### getString

          public String getString()

      Returns the string associated with this renderable string.
      Returns:
        the string associated with this renderable string.

    - #### getFont

          public Font getFont()

      Returns the font associated with this renderable string.
      Returns:
        the font associated with this renderable string.

    - #### getWidth

          public int getWidth()

      Returns the width of the graphical bounds of this renderable string.

      This method has the same specifications as `Font.stringWidth(String)`.

      Returns:
        the width taken by this renderable string, in pixels.

    - #### getHeight

          public int getHeight()

      Returns the height of the graphical bounds of this renderable string.

      This method has the same specifications as `Font.getHeight()`.

      Returns:
        the height taken by this renderable string, in pixels.