继承 Text
View
模块 hilo/view/Text
依赖
hilo/core/Class, hilo/core/Hilo, hilo/view/View
源码
Text.js
Text类提供简单的文字显示功能。复杂的文本功能可以使用DOMElement。
属性 | 定义于 | |
---|---|---|
color:String
指定使用的字体颜色。
|
Text | |
font:String
指定使用的字体样式。
|
Text | |
lineSpacing:Number
指定文本的行距。单位为像素。默认值为0。
|
Text | |
outline:Boolean
指定文本是绘制边框还是填充。
|
Text | |
text:String
指定要显示的文本内容。
|
Text | |
textAlign:String
指定文本的对齐方式。可以是以下任意一个值:'start', 'end', 'left', 'right', and 'center'。
|
Text | |
textHeight:Number
指示文本内容的高度,只读属性。仅在canvas模式下有效。
|
Text | |
textWidth:Number
指示文本内容的宽度,只读属性。仅在canvas模式下有效。
|
Text |
方法 | 定义于 | |
---|---|---|
Text(properties:Object)
构造函数。
|
Text | |
measureFontHeight(font:String):Number
static
测算指定字体样式的行高。
|
Text | |
render(renderer, delta)
覆盖渲染方法。
|
Text |