Extensions

Class: Text

Text(text, options)

Text drawable class

Constructor

new Text(text, options)

Creates an instance of Text.
Parameters:
Name Type Description
text string
options object
Source:

Extends

Classes

Text

Members

align :string

Set/Get text align
Type:
  • string
Source:

callbackAfterRender :function

 Set/Get after render callback
   - It will be called after the Item rendered
Type:
  • function
Overrides:
Source:

callbackBeforeRender :function

 Set/Get before render callback
   - It will be called before the Item rendered
Type:
  • function
Overrides:
Source:

fontColor :string

Set/Get font color
Type:
  • string
Source:

fontFamily :string

Set/Get font family
Type:
  • string
Source:

fontSize :number

Set/Get font size
Type:
  • number
Source:

lineHeight :number

Set/Get line height (multiplier of font size)
Type:
  • number
Source:

parent :Container

Set/Get parent
Type:
Overrides:
Source:

(readonly) stage :StageContainer

Get StageContainer
Type:
Overrides:
Source:

text :string

Set/Get text
Type:
  • string
Source:

Methods

callEventHandler(event)

 Handle event
   - It can handle mouse events if the item is interactive and has [
     onPointerOver,
     onPointerOut,
     onPointerMove,
     onPointerDown,
     onPointerUp,
     onPointerClick
   ] function
Parameters:
Name Type Description
event *
Overrides:
Source:

destruct()

Destruct class
Overrides:
Source:

getBounds() → {Rectangle}

Returns with bounds
Overrides:
Source:
Returns:
Type
Rectangle

isContainsPoint(point) → {boolean}

Returns true if the Image contains the point
Parameters:
Name Type Description
point Point
Overrides:
Source:
Returns:
Type
boolean

remove()

Remove Item from parent
Overrides:
Source:

update()

Update Image
Overrides:
Source: