Interface TextLayout


public interface TextLayout
  • Field Details

  • Method Details

    • setContent

      boolean setContent(String string, Object font)
      Sets the content for the TextLayout. Shorthand for single span text (no rich text).
      Returns:
      returns true is the call modifies the layout internal state.
    • setWrapWidth

      boolean setWrapWidth(float wrapWidth)
      Sets the wrap width for the TextLayout.
      Returns:
      returns true is the call modifies the layout internal state.
    • setLineSpacing

      boolean setLineSpacing(float spacing)
      Sets the line spacing for the TextLayout.
      Returns:
      returns true is the call modifies the layout internal state.
    • setBoundsType

      boolean setBoundsType(int type)
      Sets the bounds type for the TextLayout.
      Returns:
      returns true is the call modifies the layout internal state.
    • getBounds

      BaseBounds getBounds()
      Returns the (logical) bounds of the layout minX is always zero minY is the ascent of the first line (negative) width the width of the widest line height the sum of all lines height Note that this width is different the wrapping width!
      Returns:
      the layout bounds