public interface TextManager
Modifier and Type | Method and Description |
---|---|
Rectangle |
computeContentSize(java.lang.String text,
ej.microui.display.Font font,
Rectangle availableSize)
Computes a text size for a font.
|
void |
drawText(ej.microui.display.GraphicsContext g,
java.lang.String text,
ej.microui.display.Font font,
int color,
Rectangle area,
int alignment)
Draws text on a graphics context.
|
Rectangle[] |
getBounds(int startIndex,
int endIndex,
java.lang.String text,
ej.microui.display.Font font,
Rectangle area,
int alignment)
Gets the bounds surrounding a part of the text.
|
int |
getIndex(int x,
int y,
java.lang.String text,
ej.microui.display.Font font,
Rectangle area,
int alignment)
Gets the index of the character at a location.
|
Rectangle computeContentSize(java.lang.String text, ej.microui.display.Font font, Rectangle availableSize)
text
- the text.font
- the font.availableSize
- the available size.void drawText(ej.microui.display.GraphicsContext g, java.lang.String text, ej.microui.display.Font font, int color, Rectangle area, int alignment)
The given graphics context is translated and clipped according to the given area.
g
- the graphics context to draw the text on.text
- the text to render.font
- the font to use.color
- the color to use.area
- the text area.alignment
- the text alignment.int getIndex(int x, int y, java.lang.String text, ej.microui.display.Font font, Rectangle area, int alignment)
x
- the x coordinate of the location to search the character at.y
- the x coordinate of the location to search the character at.text
- the text to search the character in.font
- the font.area
- the text area.alignment
- the text alignment.Rectangle[] getBounds(int startIndex, int endIndex, java.lang.String text, ej.microui.display.Font font, Rectangle area, int alignment)
startIndex
- the sub text start index.endIndex
- the sub text end index.text
- the text.font
- the font.area
- the text area.alignment
- the text alignment.