Class StyledText.Span

Enclosing class:
StyledText

public static class StyledText.Span extends StyledText.Plain
A single line of plain (uniformly styled) text.
  • Constructor Details

  • Method Details

    • width

      public float width()
      Description copied from class: StyledText
      The width of this styled text when rendered.
      Specified by:
      width in class StyledText
    • height

      public float height()
      Description copied from class: StyledText
      The height of this styled text when rendered.
      Specified by:
      height in class StyledText
    • render

      public void render(Canvas canvas, float x, float y)
      Description copied from class: StyledText
      Renders this styled text into the supplied canvas at the specified offset.
      Specified by:
      render in class StyledText
    • resize

      public StyledText.Span resize(float size)
      Description copied from class: StyledText.Plain
      Creates a new instance equivalent to this one excepting that the font size is adjusted to size. This is useful for auto-shrinking text to fit into fixed space.
      Specified by:
      resize in class StyledText.Plain
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class StyledText.Plain
    • toString

      public String toString()
      Overrides:
      toString in class Object