BitmapText


Inheritance BitmapText Container View Module hilo/view/BitmapText Requires hilo/core/Class, hilo/core/Hilo, hilo/view/Container, hilo/view/Bitmap Source BitmapText.js
BitmapText support bitmap text function ,but only support single-line text


Properties

Show Inherited Properties
Property Defined
glyphs:Object
font glyph set of bitmap.
BitmapText
letterSpacing:Number
spacing of letter.
BitmapText
text:String
content of bitmap text.
BitmapText
textAlign:String
property values:left、center、right, default:left,Not writable,set this property by 'setTextAlign'
BitmapText

Methods

Show Inherited Methods
Method Defined
BitmapText(properties:Object)
Constructor
BitmapText
hasGlyphs(str:String):Boolean
detect whether can display the string by the currently assigned font provided
BitmapText
setText(text:String):BitmapText
set the content of bitmap text
BitmapText
setTextAlign(textAlign):BitmapText
set the textAlign of text。
BitmapText
createGlyphs(text:String, image:Image, col:Number, row:Number):BitmapText
static easy way to generate a collection of glyphs
BitmapText

Property Detail

glyphs:Object
font glyph set of bitmap. format:{letter:{image:img, rect:[0,0,100,100]}}
letterSpacing:Number
spacing of letter. default:0
text:String
content of bitmap text. Not writable,set this value by 'setText'
textAlign:String
property values:left、center、right, default:left,Not writable,set this property by 'setTextAlign'

Constructor

BitmapText(properties:Object)
parameters
properties:Object — the options of create Instance.It can contains all writable property

Method Detail

[Static] createGlyphs(text:String, image:Image, col:Number, row:Number):BitmapText
easy way to generate a collection of glyphs
parameters
text:String — character text.
image:Image — character image.
col:Number — default:the length of string
row:Number — default:1
return
BitmapText — BitmapText对象本身。链式调用支持。
hasGlyphs(str:String):Boolean
detect whether can display the string by the currently assigned font provided
parameters
str:String — to detect string
return
Boolean — whether can display the string
setText(text:String):BitmapText
set the content of bitmap text
parameters
text:String — content
return
BitmapText — BitmapText Instance,support chained calls
setTextAlign(textAlign):BitmapText
set the textAlign of text。
parameters
textAlign — value of textAlign:left、center、right
return
BitmapText — itmapText Instance,support chained calls