Class me.BitmapFont
Extends
me.Font.
Defined in: <build/melonJS-0.9.3.js>.
| Constructor Attributes | Constructor Name and Description |
|---|---|
|
me.BitmapFont(font, size, scale, firstChar)
a bitpmap font object
|
| Method Attributes | Method Name and Description |
|---|---|
|
draw(context, text, x, y)
draw a text at the specified coord
|
|
|
measureText(text)
measure the given test width
|
|
|
resize(scale)
change the font display size
|
|
|
set(align, scale)
change the font settings
|
Method Detail
draw(context, text, x, y)
draw a text at the specified coord
- Parameters:
- {Context} context
- 2D Context
- {String} text
- {int} x
- {int} y
{int}
measureText(text)
measure the given test width
- Parameters:
- {String} text
- Returns:
- {int} width
resize(scale)
change the font display size
- Parameters:
- {int} scale
- ratio
set(align, scale)
change the font settings
- Parameters:
- {String} align
- ("left", "center", "right")
- {int} scale Optional