API Document Index



Class me.Font


Extends Object.

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

Class Summary
Constructor Attributes Constructor Name and Description
 
me.Font(font, size, color, align)
a generic system font object.
Method Summary
Method Attributes Method Name and Description
 
bold()
make the font bold
 
draw(context, text, x, y)
draw a text at the specified coord
 
make the font italic
 
measureText(context, text)
measure the given test width
 
set(font, size, color, align)
Change the font settings
Class Detail
me.Font(font, size, color, align)
a generic system font object.
Parameters:
{String} font
{int} size
{String} color
{String} align Optional, Default: "top"
Method Detail
bold()
make the font bold

draw(context, text, x, y)
draw a text at the specified coord
Parameters:
{Context} context
2D Context
{String} text
{int} x
{int} y

italic()
make the font italic

{int} measureText(context, text)
measure the given test width
Parameters:
{Context} context
2D Context
{String} text
Returns:
{int} width

set(font, size, color, align)
Change the font settings
Parameters:
{String} font
{int} size
{String} color
{String} align Optional, Default: "top"

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