BitmapChar
public class
loom2d.text.BitmapChar
Description
A BitmapChar contains the information about one char of a bitmap font.
You don't have to use this class directly in most cases.
The TextField class contains methods that handle bitmap fonts for you.
API overview
Constructor
BitmapChar
(
id: Number
,
texture: Texture
,
xOffset: Number
,
yOffset: Number
,
xAdvance: Number
)
Creates a char with a texture and its properties
Attributes
Public attributes
| charID: Number |
read-only
The unicode ID of the char |
| height: Number |
read-only
The height of the character in points |
| texture: Texture |
read-only
The texture of the character |
| width: Number |
read-only
The width of the character in points |
| xAdvance: Number |
read-only
The number of points the cursor has to be moved to the right for the next char |
| xOffset: Number |
read-only
The number of points to move the char in x direction on character arrangement |
| yOffset: Number |
read-only
The number of points to move the char in y direction on character arrangement |
Functions
Public functions
| addKerning ( charID: Number , amount: Number ): Void |
Adds kerning information relative to a specific other character ID |
| createImage (): Image |
Creates an image of the char |
| getKerning ( charID: Number ): Number |
Retrieve kerning information relative to the given character ID |
Constructor
Attributes
xAdvance: Number
read-only
The number of points the cursor has to be moved to the right for the next char.
xOffset: Number
read-only
The number of points to move the char in x direction on character arrangement.
yOffset: Number
read-only
The number of points to move the char in y direction on character arrangement.
Functions
addKerning ( charID: Number , amount: Number ): Void
Adds kerning information relative to a specific other character ID.
Parameters
| charID: Number | |
| amount: Number |
getFullTypeName
(): String
Inherited from Object
native
Gets the fully qualified type name of the Object. The fully qualified type name includes the package of the type.
Returns
| String | fully qualified type name of the Object. |
getKerning ( charID: Number ): Number
Retrieve kerning information relative to the given character ID.
Parameters
| charID: Number |
getType
(): Type
Inherited from Object
native
Gets the Type that describes the Object.
Returns
| Type | The Type that describes the object. |