Class R.text.BitmapText
Extends
R.text.AbstractTextRenderer.
A text renderer which draws text from a bitmap font file. This type of text
renderer is only supported by the R.rendercontexts.CanvasContext. For an R.rendercontexts.HTMLElementContext
or a derivative, use the R.text.ContextText renderer.
Defined in: bitmaptext.js.
Constructor Attributes | Constructor Name and Description |
---|---|
R.text.BitmapText(font)
|
- Fields borrowed from class R.text.AbstractTextRenderer:
- ALIGN_CENTER, ALIGN_LEFT, ALIGN_RIGHT
- Fields borrowed from class R.components.Base:
- TYPE_COLLIDER, TYPE_INPUT, TYPE_LOGIC, TYPE_RENDERING, TYPE_TRANSFORM
Method Attributes | Method Name and Description |
---|---|
Get the class name of this object
|
|
release()
Release the text renderer back into the pool for reuse
|
|
setSize(size)
Set the scaling of the text
|
|
setText(text)
Set the text to render.
|
- Methods borrowed from class R.text.AbstractTextRenderer:
- getColor, getLineSpacing, getSize, getText, getTextAlignment, getTextFont, getTextStyle, getTextWeight, isNative, setColor, setLineSpacing, setTextAlignment, setTextFont, setTextStyle, setTextWeight
- Methods borrowed from class R.components.Base:
- execute, getGameObject, getHostObject, getPriority, getType, getTypeString, setGameObject, setHostObject, setPriority
- Methods borrowed from class R.engine.BaseObject:
- addEvent, addEvents, destroy, getElement, jQ, removeEvent, setElement, triggerEvent, update
- Methods borrowed from class R.engine.PooledObject:
- clearObjectDataModel, getId, getName, getObjectDataModel, getProperties, isDestroyed, setName, setObjectDataModel, toString, toXML
Class Detail
R.text.BitmapText(font)
- Parameters:
- font
- {Font} A resource obtained by calling FontResourceLoader#get
Method Detail
{String}
getClassName()
Get the class name of this object
- Returns:
- {String} The string "R.text.BitmapText"
release()
Release the text renderer back into the pool for reuse
setSize(size)
Set the scaling of the text
- Parameters:
- size
- {Number}
setText(text)
Set the text to render.
- Parameters:
- text
- {String} The text to render