Class StyledText.Block

Enclosing class:
StyledText

public static class StyledText.Block extends StyledText.Plain
Multiple lines of plain (uniformly styled) text.
  • Field Details

    • wrap

      public final TextWrap wrap
      The text wrap configuration, unused if not wrapping.
    • align

      public final TextBlock.Align align
      The alignment of wrapped text, unused if not wrapping.
    • lineSpacing

      public final float lineSpacing
      Additional space to be added (or subtracted) from the default line spacing.
  • 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.Block 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
    • hashCode

      public int hashCode()
      Overrides:
      hashCode 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