Class R.text.VectorText
Extends
R.text.AbstractTextRenderer.
A text renderer which draws text with simple vectors. This type of text
renderer is only supported by the {@link R.rendercontexts.CanvasContext CanvasContext}.
For an {@link R.rendercontexts.HTMLElementContext HTMLElementContext}
or a derivative, use the R.text.ContextText renderer.
Defined in: vectortext.js.
Constructor Attributes | Constructor Name and Description |
---|---|
R.text.VectorText(componentName, priority)
|
- 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.
|
|
setTextAlignment(align)
Set the text alignment
|
- Methods borrowed from class R.text.AbstractTextRenderer:
- getColor, getLineSpacing, getSize, getText, getTextAlignment, getTextFont, getTextStyle, getTextWeight, isNative, setColor, setLineSpacing, 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.VectorText(componentName, priority)
- Parameters:
- componentName
- {String} The name of the text component
- priority
- {Number} The priority of the component
Method Detail
{String}
getClassName()
Get the class name of this object
- Returns:
- {String} The string "R.text.VectorText"
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 vectorize
setTextAlignment(align)
Set the text alignment
- Parameters:
- align
- {Number}