public class SpenTextMeasure extends Object
| Constructor and Description |
|---|
SpenTextMeasure()
Creates an SpenTextMeasure instance.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getHeight()
Get the height of the view.
|
int |
getLineCount()
Get the number of lines in the view.
|
int |
getLineEndIndex(int lineNumber)
Get the text offset after the last character on the specified line.
|
PointF |
getLinePosition(int lineNumber)
Get the position of the specified line.
|
int |
getLineStartIndex(int lineNumber)
Get the text offset at the beginning of the specified line.
|
int |
getMinHeight()
Get the minimum height of the view.
|
RectF |
getTextRect(int textIndex)
Get the rect of the smallest rectangle that encloses all the characters.
|
boolean |
setObjectShape(SpenObjectShape objectShape)
Set the specified shape object.
|
boolean |
setObjectText(SpenObjectShape objectText)
Set the specified text box object.
|
public SpenTextMeasure()
public boolean setObjectShape(SpenObjectShape objectShape)
objectShape - The shape object.IllegalArgumentException - Thrown if objectShape is null.public boolean setObjectText(SpenObjectShape objectText)
objectText - The text box object.IllegalArgumentException - Thrown if objectText is null.public int getHeight()
public int getMinHeight()
public int getLineCount()
public PointF getLinePosition(int lineNumber)
lineNumber - The line number.public RectF getTextRect(int textIndex)
textIndex - The character index.public int getLineStartIndex(int lineNumber)
lineNumber - The line number.public int getLineEndIndex(int lineNumber)
lineNumber - The line number.