void
Draw this Layout on the specified Canvas.
final void
Draw the visible background drawables of this Layout on the specified canvas.
void
Draw all visible text lines of this Layout on the specified canvas.
Return the base alignment of this layout.
abstract int
Returns the number of extra pixels of descent padding in the
bottom line of the Layout.
void
Fills in the specified Path with a representation of a cursor
at the specified offset.
static float
Return how wide a layout must be in order to display the specified text slice with one
line per paragraph.
static float
Return how wide a layout must be in order to display the
specified text slice with one line per paragraph.
static float
Return how wide a layout must be in order to display the specified text with one line per
paragraph.
static float
Return how wide a layout must be in order to display the
specified text slice with one line per paragraph.
abstract int
Returns the number of characters to be ellipsized away, or 0 if
no ellipsis is to take place.
abstract int
Return the offset of the first character to be ellipsized away,
relative to the start of the line.
int
Return the width to which this Layout is ellipsizing, or
getWidth()
if it is not doing anything special.
int
Return the total height of this layout.
int
Return the total height of this layout.
int
Returns the left indent for a line.
final int
Get the ascent of the text on the specified line.
final int
Return the vertical position of the baseline of the specified line.
final int
Return the vertical position of the bottom of the specified line.
int
Return the baseline for the specified line (0…getLineCount() - 1)
If bounds is not null, return the top, left, right, bottom extents
of the specified line in it.
abstract boolean
Returns whether the specified line contains one or more
characters that need to be handled specially, like tabs.
abstract int
Return the number of lines of text in this layout.
abstract int
Return the descent of the specified line(0…getLineCount() - 1).
Returns the directional run information for the specified line.
final int
Return the text offset after the last character on the specified line.
int
Get the line number on which the specified text offset appears.
int
Get the line number corresponding to the specified vertical position.
float
Get the leftmost position that should be exposed for horizontal
scrolling on the specified line.
float
Gets the unsigned horizontal extent of the specified line, including
leading margin indent, but excluding trailing whitespace.
final long
Computes the range of visible lines that will be drawn on the specified canvas.
float
Get the rightmost position that should be exposed for horizontal
scrolling on the specified line.
abstract int
Return the text offset of the beginning of the specified line (
0…getLineCount()).
abstract int
Return the vertical position of the top of the specified line
(0…getLineCount()).
int
Return the text offset after the last visible character (so whitespace
is not counted) on the specified line.
float
Gets the unsigned horizontal extent of the specified line, including
leading margin indent and trailing whitespace.
int
Get the character offset on the specified line whose position is
closest to the specified horizontal position.
int
Get the character offset on the specified line whose position is
closest to the specified horizontal position.
int
int
Return the base Paint properties for this layout.
Get the alignment of the specified paragraph, taking into account
markup attached to it.
abstract int
Returns the primary directionality of the paragraph containing the
specified line, either 1 for left-to-right lines, or -1 for right-to-left
lines (see
DIR_LEFT_TO_RIGHT
,
DIR_RIGHT_TO_LEFT
).
final int
Get the left edge of the specified paragraph, inset by left margins.
final int
Get the right edge of the specified paragraph, inset by right margins.
float
Get the primary horizontal position for the specified text offset.
float
Get the primary horizontal position for the specified text offset, but
optionally clamp it so that it doesn't exceed the width of the layout.
float
Get the secondary horizontal position for the specified text offset.
float
Get the secondary horizontal position for the specified text offset, but
optionally clamp it so that it doesn't exceed the width of the layout.
void
getSelectionPath(int start,
int end,
it.unimi.dsi.fastutil.floats.FloatArrayList dest)
Calculates the rectangles which should be highlighted to indicate a selection between start
and end and feeds them into the given array.
Return the text that is displayed by this Layout.
Return the heuristic used to determine paragraph text direction.
abstract int
Returns the (negative) number of extra pixels of ascent padding in the
top line of the Layout.
final int
Return the width of this layout.
final void
Increase the width of this layout to the specified width.
boolean
Returns true if the character at offset and the preceding character
are at different run levels (and thus there's a split caret).
boolean
Returns true if the character at offset is right to left (RTL).
boolean
Checks if the trailing BiDi level should be used for an offset
boolean[]
Computes in linear time the results of calling
#primaryIsTrailingPrevious for all offsets on a line.