public class TextRenderer
extends java.lang.Object
| Constructor and Description |
|---|
TextRenderer() |
| Modifier and Type | Method and Description |
|---|---|
static void |
drawText(android.graphics.Canvas graphics,
java.lang.String text,
android.graphics.RectF rect,
Font font,
Align alignment,
float maxWidth)
Draws the specified text with specified attributes.
|
static void |
drawText(android.graphics.Canvas graphics,
java.lang.String text,
android.graphics.RectF rect,
Font font,
Align alignment,
float maxWidth,
android.graphics.Paint paint)
Draws the specified text with specified attributes.
|
static Dimension |
measureText(java.lang.String text,
float maxWidth,
Font font)
Returns the size of the specified string when render with specified font.
|
public static Dimension measureText(java.lang.String text, float maxWidth, Font font)
text - A String instance containing the text to measure.maxWidth - A float value specifying the maximum width of the text.font - A Font instance.public static void drawText(android.graphics.Canvas graphics,
java.lang.String text,
android.graphics.RectF rect,
Font font,
Align alignment,
float maxWidth)
graphics - A Canvas where the text should be rendered.text - A String containing the text to draw.rect - A RectF instance specifying the text layout rectangle.font - A Font instance.alignment - A member of the Align enumeration.maxWidth - A float value specifying the maximum width of the text.public static void drawText(android.graphics.Canvas graphics,
java.lang.String text,
android.graphics.RectF rect,
Font font,
Align alignment,
float maxWidth,
android.graphics.Paint paint)
graphics - A Canvas where the text should be rendered.text - A String containing the text to draw.rect - A RectF instance specifying the text layout rectangle.font - A Font instance.alignment - A member of the Align enumeration.maxWidth - A float value specifying the maximum width of the text.paint - A Paint instance.