API Document Index



Class me.BitmapFont


Extends me.Font.

Defined in: <build/melonJS-0.9.3.js>.

Class Summary
Constructor Attributes Constructor Name and Description
 
me.BitmapFont(font, size, scale, firstChar)
a bitpmap font object
Method Summary
Method Attributes Method Name and Description
 
draw(context, text, x, y)
draw a text at the specified coord
 
measure the given test width
 
resize(scale)
change the font display size
 
set(align, scale)
change the font settings
Methods borrowed from class me.Font:
bold, italic
Class Detail
me.BitmapFont(font, size, scale, firstChar)
a bitpmap font object
Parameters:
{String} font
{int/Object} size
either an int value, or an object like {x:16,y:16}
{int} scale Optional, Default: "1.0"
{String} firstChar Optional, Default: "0x20"
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

Documentation generated by JsDoc Toolkit 2.4.0 on Tue May 01 2012 12:00:48 GMT+0800 (CST)