| Package | com.addicted2flash.util |
| Class | public class TextDrawer |
This can be necessary when the same type of text-style is used in
many objects. With this class you can avoid greedy instances of the
TextField class.
| Property | Defined by | ||
|---|---|---|---|
| size : Size
Returns the clipping
Size of the copy region. | TextDrawer | ||
| textField : TextField
Returns the
TextField set to be drawn. | TextDrawer | ||
| Method | Defined by | ||
|---|---|---|---|
|
TextDrawer(textField:TextField)
Creates a new
TextDrawer. | TextDrawer | ||
|
createBitmap(text:String, pixelSnapping:String = "auto", smoothing:Boolean = false):Bitmap
Creates an returns a
Bitmap with the copied text in it. | TextDrawer | ||
|
createBitmapData(text:String):BitmapData
Creates an returns a
BitmapData with the copied text in it. | TextDrawer | ||
|
drawBitmap(bitmap:Bitmap, text:String):void
Draws the text in the given
Bitmap. | TextDrawer | ||
|
drawBitmapData(data:BitmapData, text:String):void
Draws the text in the given
BitmapData. | TextDrawer | ||
| size | property |
size:Size [read-write]
Returns the clipping Size of the copy region.
public function get size():Size
public function set size(value:Size):void
| textField | property |
textField:TextField [read-write]
Returns the TextField set to be drawn.
public function get textField():TextField
public function set textField(value:TextField):void
| TextDrawer | () | constructor |
public function TextDrawer(textField:TextField)
Creates a new TextDrawer.
textField:TextField — the textField to copy
|
| createBitmap | () | method |
public function createBitmap(text:String, pixelSnapping:String = "auto", smoothing:Boolean = false):Bitmap
Creates an returns a Bitmap with the copied text in it.
text:String — text to be copied
|
|
pixelSnapping:String (default = "auto") — pixel snapping
|
|
smoothing:Boolean (default = false) — smoothing
|
Bitmap — a Bitmap with the copied text in it
|
| createBitmapData | () | method |
public function createBitmapData(text:String):BitmapData
Creates an returns a BitmapData with the copied text in it.
text:String — text to be copied
|
BitmapData — a BitmapData with the copied text in it
|
| drawBitmap | () | method |
public function drawBitmap(bitmap:Bitmap, text:String):void
Draws the text in the given Bitmap.
bitmap:Bitmap — Bitmap
|
|
text:String — text to be copied
|
| drawBitmapData | () | method |
public function drawBitmapData(data:BitmapData, text:String):void
Draws the text in the given BitmapData.
data:BitmapData — BitmapData
|
|
text:String — text to be copied
|