Packagestarling.text
Interfacepublic interface ITextCompositor
Implementors BitmapFont, TrueTypeCompositor

A text compositor arranges letters for Starling's TextField.



Public Methods
 MethodDefined By
  
clearMeshBatch(meshBatch:MeshBatch):void
Clears the MeshBatch (filled by the same class) and disposes any resources that are no longer needed.
ITextCompositor
  
dispose():void
Frees all resources allocated by the compositor.
ITextCompositor
  
fillMeshBatch(meshBatch:MeshBatch, width:Number, height:Number, text:String, format:TextFormat, options:TextOptions = null):void
Draws the given text into a MeshBatch, using the supplied format and options.
ITextCompositor
  
Creates and/or sets up the default MeshStyle to be used for rendering.
ITextCompositor
Method Detail
clearMeshBatch()method
public function clearMeshBatch(meshBatch:MeshBatch):void

Clears the MeshBatch (filled by the same class) and disposes any resources that are no longer needed.

Parameters

meshBatch:MeshBatch

dispose()method 
public function dispose():void

Frees all resources allocated by the compositor.

fillMeshBatch()method 
public function fillMeshBatch(meshBatch:MeshBatch, width:Number, height:Number, text:String, format:TextFormat, options:TextOptions = null):void

Draws the given text into a MeshBatch, using the supplied format and options.

Parameters

meshBatch:MeshBatch
 
width:Number
 
height:Number
 
text:String
 
format:TextFormat
 
options:TextOptions (default = null)

getDefaultMeshStyle()method 
public function getDefaultMeshStyle(previousStyle:MeshStyle, format:TextFormat, options:TextOptions):MeshStyle

Creates and/or sets up the default MeshStyle to be used for rendering. If previousStyle has the correct type, it is configured as needed and then returned; otherwise, a new style is created, configured and returned. The method may return null if there are no special style requirements.

Parameters

previousStyle:MeshStyle
 
format:TextFormat
 
options:TextOptions

Returns
MeshStyle