public interface Text
Modifier and Type | Field and Description |
---|---|
static int |
BOLD
Bold text.
|
static int |
ITALIC
Italic text.
|
static int |
NORMAL
Normal text.
|
Modifier and Type | Method and Description |
---|---|
void |
draw(java.awt.Graphics2D g,
java.lang.String text,
int x,
int y,
Alignment alignment)
Renders text on graphic output, to the specified location and alignment.
|
int |
getSize()
Get the text size in px (8px, 12px ...).
|
void |
setColor(java.awt.Color color)
Set the new text color value.
|
static final int NORMAL
static final int ITALIC
static final int BOLD
void draw(java.awt.Graphics2D g, java.lang.String text, int x, int y, Alignment alignment)
g
- graphic output.text
- text string.x
- abscissa.y
- ordinate.alignment
- alignement value (left, centered, right).void setColor(java.awt.Color color)
color
- color value.int getSize()