Class TextLayoutResult

    • Field Detail

      • wordHasBeenSplit

        protected boolean wordHasBeenSplit
        Indicates whether some word was split during layout.
      • splitForcedByNewline

        protected boolean splitForcedByNewline
        Indicates whether split was forced by new line symbol in text or not.
      • containsPossibleBreak

        protected boolean containsPossibleBreak
      • startsWithSplitCharacterWhiteSpace

        protected boolean startsWithSplitCharacterWhiteSpace
      • endsWithSplitCharacter

        protected boolean endsWithSplitCharacter
      • leftMinWidth

        protected float leftMinWidth
      • rightMinWidth

        protected float rightMinWidth
    • Method Detail

      • isWordHasBeenSplit

        public boolean isWordHasBeenSplit()
        Indicates whether some word in a rendered text was split during layout. The value will be set as true if, for example, the rendered words width is bigger than the width of layout area.
        Returns:
        whether some word was split or not.
      • isSplitForcedByNewline

        public boolean isSplitForcedByNewline()
        Indicates whether split was forced by new line symbol in rendered text. The value will be set as true if, for example, the rendered text contains '\n' symbol. This value can also be true even if the text was fully placed, but had line break at the end.
        Returns:
        whether split was forced by new line or not.
      • isContainsPossibleBreak

        public boolean isContainsPossibleBreak()
        Indicates whether split renderer contains possible break. Possible breaks are either whitespaces or split characters.
        Returns:
        true if there's a possible break within the split renderer.
        See Also:
        ISplitCharacters
      • isStartsWithSplitCharacterWhiteSpace

        public boolean isStartsWithSplitCharacterWhiteSpace()
        Indicates whether TextRenderer#line starts with a whitespace.
        Returns:
        true if TextRenderer#line starts with a whitespace.
      • isEndsWithSplitCharacter

        public boolean isEndsWithSplitCharacter()
        Indicates whether TextRenderer#line ends with a splitCharacter.
        Returns:
        true if TextRenderer#line ends with a splitCharacter.
        See Also:
        ISplitCharacters
      • setLeftMinWidth

        public TextLayoutResult setLeftMinWidth​(float leftMinWidth)
        Sets min width of the leftmost unbreakable part of the TextRenderer#line after layout. This value includes left-side additional width, i.e. left margin, border and padding widths. In case when entire TextRenderer#line is unbreakable, leftMinWidth also includes right-side additional width.
        Parameters:
        leftMinWidth - min width of the leftmost unbreakable part of the TextRenderer#line after layout.
        Returns:
        this layout result the setting was applied on.
      • getLeftMinWidth

        public float getLeftMinWidth()
        Gets min width of the leftmost unbreakable part of the TextRenderer#line after layout. This value leftMinWidth includes left-side additional width, i.e. left margin, border and padding widths. In case when entire TextRenderer#line is unbreakable, leftMinWidth also includes right-side additional width.
        Returns:
        min width of the leftmost unbreakable part of the TextRenderer#line after layout.
      • setRightMinWidth

        public TextLayoutResult setRightMinWidth​(float rightMinWidth)
        Sets min width of the rightmost unbreakable part of the TextRenderer#line after layout. This value includes right-side additional width, i.e. right margin, border and padding widths. In case when entire TextRenderer#line is unbreakable, this value must be -1 and right-side additional width must be included in leftMinWidth.
        Parameters:
        rightMinWidth - min width of the rightmost unbreakable part of the TextRenderer#line after layout.
        Returns:
        this layout result the setting was applied on.
      • getRightMinWidth

        public float getRightMinWidth()
        Gets min width of the rightmost unbreakable part of the TextRenderer#line after layout. This value includes right-side additional width, i.e. right margin, border and padding widths. In case when entire TextRenderer#line is unbreakable, this value must be -1 and right-side additional width must be included in leftMinWidth.
        Returns:
        min width of the leftmost unbreakable part of the TextRenderer#line after layout.