Class Line

java.lang.Object
com.github.tommyettinger.textra.Line

public class Line extends Object
One line of possibly-colorful, possibly-styled text, with a width and height set by Font.markup(String, Layout) on Lines in a Layout. This stores each (colorful, styled) char as a long in a libGDX LongArray. This is a Poolable class, and you can obtain a Line with new Line(), or just using a constructor.
  • Field Details

    • glyphs

      public final com.badlogic.gdx.utils.LongArray glyphs
    • width

      public float width
    • height

      public float height
  • Constructor Details

    • Line

      public Line()
    • Line

      public Line(int capacity)
  • Method Details

    • size

      public Line size(float width, float height)
    • reset

      public void reset()
      Resets the object for reuse. This clears glyphs, rather than nulling it. The sizes are set to 0.
    • appendTo

      public StringBuilder appendTo(StringBuilder sb)
    • toString

      public String toString()
      Overrides:
      toString in class Object