Save the date! Android Dev Summit is coming to Sunnyvale, CA on Oct 23-24, 2019.

LineBreaker.Result

public static class LineBreaker.Result
extends Object

java.lang.Object
   ↳ android.graphics.text.LineBreaker.Result


Holds the result of the LineBreaker#computeLineBreaks.

Summary

Public methods

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.

int getLineHyphenEdit(int lineIndex)

Returns a packed packed hyphen edit for the line.

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.

Inherited methods

Public methods

getLineAscent

public float getLineAscent (int lineIndex)

Returns font ascent of the line in pixels.
This units of this value are pixels.

Parameters
lineIndex int: an index of the line. Value is 0 or greater

Returns
float an entier font ascent of the line in pixels. This units of this value are pixels. {}

getLineBreakOffset

public int getLineBreakOffset (int lineIndex)

Returns character offset of the break for a given line.

Parameters
lineIndex int: an index of the line. Value is 0 or greater

Returns
int the break offset. Value is 0 or greater

getLineCount

public int getLineCount ()

Returns the number of lines in the paragraph.

Returns
int number of lines Value is 0 or greater

getLineDescent

public float getLineDescent (int lineIndex)

Returns font descent of the line in pixels.
This units of this value are pixels.

Parameters
lineIndex int: an index of the line. Value is 0 or greater

Returns
float an entier font descent of the line in pixels. This units of this value are pixels. {}

getLineHyphenEdit

public int getLineHyphenEdit (int lineIndex)

Returns a packed packed hyphen edit for the line.

Parameters
lineIndex int: an index of the line.

Returns
int a packed hyphen edit for the line.

getLineWidth

public float getLineWidth (int lineIndex)

Returns width of a given line in pixels.
This units of this value are pixels.

Parameters
lineIndex int: an index of the line. Value is 0 or greater

Returns
float width of the line in pixels This units of this value are pixels. {}

hasLineTab

public boolean hasLineTab (int lineIndex)

Returns true if the line has a TAB character.

Parameters
lineIndex int: an index of the line.

Returns
boolean true if the line has a TAB character