Packagestarling.text
Classpublic class BitmapChar
InheritanceBitmapChar Inheritance Object

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.



Public Properties
 PropertyDefined By
  charID : int
[read-only] The unicode ID of the char.
BitmapChar
  height : Number
[read-only] The height of the character in points.
BitmapChar
  texture : Texture
[read-only] The texture of the character.
BitmapChar
  width : Number
[read-only] The width of the character in points.
BitmapChar
  xAdvance : Number
[read-only] The number of points the cursor has to be moved to the right for the next char.
BitmapChar
  xOffset : Number
[read-only] The number of points to move the char in x direction on character arrangement.
BitmapChar
  yOffset : Number
[read-only] The number of points to move the char in y direction on character arrangement.
BitmapChar
Public Methods
 MethodDefined By
  
BitmapChar(id:int, texture:Texture, xOffset:Number, yOffset:Number, xAdvance:Number)
Creates a char with a texture and its properties.
BitmapChar
  
addKerning(charID:int, amount:Number):void
Adds kerning information relative to a specific other character ID.
BitmapChar
  
Creates an image of the char.
BitmapChar
  
getKerning(charID:int):Number
Retrieve kerning information relative to the given character ID.
BitmapChar
Property Detail
charIDproperty
charID:int  [read-only]

The unicode ID of the char.


Implementation
    public function get charID():int
heightproperty 
height:Number  [read-only]

The height of the character in points.


Implementation
    public function get height():Number
textureproperty 
texture:Texture  [read-only]

The texture of the character.


Implementation
    public function get texture():Texture
widthproperty 
width:Number  [read-only]

The width of the character in points.


Implementation
    public function get width():Number
xAdvanceproperty 
xAdvance:Number  [read-only]

The number of points the cursor has to be moved to the right for the next char.


Implementation
    public function get xAdvance():Number
xOffsetproperty 
xOffset:Number  [read-only]

The number of points to move the char in x direction on character arrangement.


Implementation
    public function get xOffset():Number
yOffsetproperty 
yOffset:Number  [read-only]

The number of points to move the char in y direction on character arrangement.


Implementation
    public function get yOffset():Number
Constructor Detail
BitmapChar()Constructor
public function BitmapChar(id:int, texture:Texture, xOffset:Number, yOffset:Number, xAdvance:Number)

Creates a char with a texture and its properties.

Parameters
id:int
 
texture:Texture
 
xOffset:Number
 
yOffset:Number
 
xAdvance:Number
Method Detail
addKerning()method
public function addKerning(charID:int, amount:Number):void

Adds kerning information relative to a specific other character ID.

Parameters

charID:int
 
amount:Number

createImage()method 
public function createImage():Image

Creates an image of the char.

Returns
Image
getKerning()method 
public function getKerning(charID:int):Number

Retrieve kerning information relative to the given character ID.

Parameters

charID:int

Returns
Number