| Package | starling.text |
| Class | public class BitmapCharLocation |
| Inheritance | BitmapCharLocation Object |
This class is used and returned by BitmapFont.arrangeChars().
It's typically only needed for advanced changes to Starling's default text composition
mechanisms.
This class supports object pooling. All instances returned by the methods
instanceFromPool and vectorFromPool are returned to the
respective pool when calling rechargePool.
| Property | Defined By | ||
|---|---|---|---|
| char : BitmapChar The actual bitmap char to be drawn. | BitmapCharLocation | ||
| index : int The index of this char in the processed String. | BitmapCharLocation | ||
| scale : Number The scale with which the char must be placed. | BitmapCharLocation | ||
| x : Number The x-coordinate of the char's location. | BitmapCharLocation | ||
| y : Number The y-coordinate of the char's location. | BitmapCharLocation | ||
| Method | Defined By | ||
|---|---|---|---|
BitmapCharLocation(char:BitmapChar) Create a new instance that references the given char. | BitmapCharLocation | ||
[static] Returns a "BitmapCharLocation" instance from the pool, initialized with the given char. | BitmapCharLocation | ||
rechargePool():void [static] Puts all objects that were previously returned by either of the "...fromPool" methods
back into the pool. | BitmapCharLocation | ||
vectorFromPool():Vector.<BitmapCharLocation> [static] Returns an empty Vector for "BitmapCharLocation" instances from the pool. | BitmapCharLocation | ||
| char | property |
public var char:BitmapCharThe actual bitmap char to be drawn.
| index | property |
public var index:intThe index of this char in the processed String.
| scale | property |
public var scale:NumberThe scale with which the char must be placed.
| x | property |
public var x:NumberThe x-coordinate of the char's location.
| y | property |
public var y:NumberThe y-coordinate of the char's location.
| BitmapCharLocation | () | Constructor |
public function BitmapCharLocation(char:BitmapChar)Create a new instance that references the given char.
Parameterschar:BitmapChar |
| instanceFromPool | () | method |
public static function instanceFromPool(char:BitmapChar):BitmapCharLocation Returns a "BitmapCharLocation" instance from the pool, initialized with the given char.
All instances will be returned to the pool when calling rechargePool.
Parameters
char:BitmapChar |
BitmapCharLocation |
| rechargePool | () | method |
public static function rechargePool():voidPuts all objects that were previously returned by either of the "...fromPool" methods back into the pool.
| vectorFromPool | () | method |
public static function vectorFromPool():Vector.<BitmapCharLocation> Returns an empty Vector for "BitmapCharLocation" instances from the pool.
All vectors will be returned to the pool when calling rechargePool.
Vector.<BitmapCharLocation> |