RichTextLayout, SimpleTextLayoutTextLayout.@Deprecated public abstract class Layout extends Object
SimpleTextLayout and RichTextLayout.
For simple text, use SimpleTextLayout; for rich text with multiple forms, use RichTextLayout.
| 限定符和类型 | 字段 | 说明 |
|---|---|---|
protected long |
mNativeLayoutHandle |
已过时。
|
| 构造器 | 说明 |
|---|---|
Layout() |
已过时。
|
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
void |
drawHighlight(Canvas canvas,
Path HighlightPath,
Paint highlightPaint,
int offSetInVertical) |
已过时。
|
void |
drawText(Canvas canvas) |
已过时。
|
int |
getAscent(int line) |
已过时。
|
int |
getBaseline(int line) |
已过时。
|
int |
getBeginCharIndex(int line) |
已过时。
|
int |
getBottom(int line) |
已过时。
|
int |
getCharIndexByCoordinate(int line,
float horizCoordinate) |
已过时。
|
float |
getCoordinateForVertical(int point) |
已过时。
|
float |
getCoordinateInMainDir(int offset) |
已过时。
|
float |
getCoordinateInSecondDir(int offset) |
已过时。
|
int |
getDescent(int line) |
已过时。
|
int |
getEndCharIndex(int line) |
已过时。
|
int |
getHeight() |
已过时。
|
int |
getLimitWidth(int line) |
已过时。
|
int |
getLineCount() |
已过时。
|
float |
getLineEnd(int line) |
已过时。
|
int |
getLineIndexByCharIndex(int offset) |
已过时。
|
int |
getLineIndexByCoordinate(int verticalCoordinate) |
已过时。
|
float |
getLineStart(int line) |
已过时。
|
float |
getNumOfFontHeight() |
已过时。
|
float |
getTextWidth(int line) |
已过时。
|
int |
getTop(int line) |
已过时。
|
int |
getWidth() |
已过时。
|
@Deprecated protected long mNativeLayoutHandle
@Deprecated public Layout()
@Deprecated public void drawText(Canvas canvas)
Canvas object after the layout is complete.canvas - Indicates the Canvas object.@Deprecated public void drawHighlight(Canvas canvas, Path HighlightPath, Paint highlightPaint, int offSetInVertical)
Canvas object with the given highlight paint and
by following the highlight path drawn between the background and the text.canvas - Indicates the Canvas object.HighlightPath - Indicates the highlight path.highlightPaint - Indicates the highlight paint.offSetInVertical - Indicates the offset to temporarily translate the canvas
when rendering the highlight.@Deprecated public final int getWidth()
@Deprecated public int getHeight()
@Deprecated public int getAscent(int line)
line - Indicates the specified line.0 if the value of line is invalid.@Deprecated public int getDescent(int line)
line - Indicates the specified line.0 if the value of line is invalid.@Deprecated public int getBaseline(int line)
line - Indicates the specified line.-1 if the value of line is invalid.@Deprecated public int getTop(int line)
line - Indicates the specified line.-1 if the value of line is invalid;
returns the bottom of the last line
if the value of line is equal to the line count obtained via getLineCount().@Deprecated public int getBottom(int line)
line - Indicates the specified line.-1 if the value of line is invalid.@Deprecated public int getLineCount()
@Deprecated public int getBeginCharIndex(int line)
line - Indicates the specified line.-1 if the value of line is invalid.@Deprecated public int getEndCharIndex(int line)
line - Indicates the specified line.-1 if the value of line is invalid.@Deprecated public int getLineIndexByCharIndex(int offset)
offset - Indicates the index of the character.-1 if the value of offset is invalid.@Deprecated public float getLineStart(int line)
line - Indicates the specified line.-1 if the value of line is invalid.@Deprecated public float getLineEnd(int line)
line - Indicates the specified line.-1 if the value of line is invalid.@Deprecated public float getTextWidth(int line)
line - Indicates the specified line.-1 if the value of line is invalid.@Deprecated public int getLimitWidth(int line)
line - Indicates the specified line.-1 if the value of line is invalid.@Deprecated public int getCharIndexByCoordinate(int line, float horizCoordinate)
line - Indicates the specified line.horizCoordinate - Indicates the given horizontal position.-1 if the value of line is invalid.@Deprecated public float getCoordinateInSecondDir(int offset)
offset - Indicates the text offset.@Deprecated public float getCoordinateInMainDir(int offset)
offset - Indicates the text offset.@Deprecated public float getNumOfFontHeight()
@Deprecated public float getCoordinateForVertical(int point)
point - Indicates the index of the character.-1 if the value of point is invalid.@Deprecated public int getLineIndexByCoordinate(int verticalCoordinate)
verticalCoordinate - Indicates the vertical coordinate.-1 if the value of verticalCoordinate is invalid.