Package icyllis.modernui.graphics.text

# Class LineBreaker.Result

java.lang.Object
icyllis.modernui.graphics.text.LineBreaker.Result

Enclosing class:
  `LineBreaker`

public static class LineBreaker.Result extends Object
Holds the result of the line breaking algorithm.

See Also:
  - `LineBreaker.computeLineBreaks(icyllis.modernui.graphics.text.MeasuredText, icyllis.modernui.graphics.text.LineBreaker.ParagraphConstraints, int[], int)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `float`
  `getLineAscent(int lineIndex)`
  Returns font ascent of the line in pixels.
  `int`
  `getLineBreakOffset(int lineIndex)`
  Returns character offset of the break for a given line.
  `int`
  `getLineCount()`
  Returns the number of lines in the paragraph.
  `float`
  `getLineDescent(int lineIndex)`
  Returns font descent of the line in pixels.
  `float`
  `getLineWidth(int lineIndex)`
  Returns width of a given line in pixels.
  `boolean`
  `hasLineTab(int lineIndex)`
  Returns true if the line has a TAB character.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Method Details

  - ### getLineCount

    public int getLineCount()
    Returns the number of lines in the paragraph.
    Returns:
      number of lines

  - ### getLineBreakOffset

    public int getLineBreakOffset(int lineIndex)
    Returns character offset of the break for a given line.
    Parameters:
      `lineIndex` - an index of the line.
    Returns:
      the break offset.

  - ### getLineWidth

    public float getLineWidth(int lineIndex)
    Returns width of a given line in pixels.
    Parameters:
      `lineIndex` - an index of the line.
    Returns:
      width of the line in pixels

  - ### getLineAscent

    public float getLineAscent(int lineIndex)
    Returns font ascent of the line in pixels.
    Parameters:
      `lineIndex` - an index of the line.
    Returns:
      font ascent of the line in pixels.

  - ### getLineDescent

    public float getLineDescent(int lineIndex)
    Returns font descent of the line in pixels.
    Parameters:
      `lineIndex` - an index of the line.
    Returns:
      font descent of the line in pixels.

  - ### hasLineTab

    public boolean hasLineTab(int lineIndex)
    Returns true if the line has a TAB character.
    Parameters:
      `lineIndex` - an index of the line.
    Returns:
      true if the line has a TAB character