Inheritance Text
View
Module hilo/view/Text
Requires
hilo/core/Class, hilo/core/Hilo, hilo/view/View, hilo/view/CacheMixin
Source
Text.js
Text class provide basic text-display function, use DOMElement for complex text-display.
Property | Defined | |
---|---|---|
color:String
Color of the text.
|
Text | |
font:String
Text's CSS font style, readonly! Use setFont function to set text font.
|
Text | |
lineSpacing:Number
The spacing between lines.
|
Text | |
maxWidth:Number
The max length of the text, default value is 200.
|
Text | |
outline:Boolean
Draw the outline of the text or fill the text.
|
Text | |
text:String
Text to display.
|
Text | |
textAlign:String
Horizontal alignment way of the text.
|
Text | |
textHeight:Number
Height of the text, readonly! Works only on canvas mode.
|
Text | |
textVAlign:String
Vertical alignment way of the text.
|
Text | |
textWidth:Number
Width of the text, readonly! Works only on canvas mode.
|
Text |
Method | Defined | |
---|---|---|
Text(properties:Object)
Constructor
|
Text | |
cache(forceUpdate:Boolean)
Cache the view.
|
Text | |
setCacheDirty(dirty:Boolean)
set the cache state diry.
|
Text | |
setFont(font:String):Text
Set text CSS font style.
|
Text | |
Update the cache.
|
Text | |
measureFontHeight(font:String):Number
static
Measure the line height of the assigned text font style.
|
Text |