pixi.text.Text
- type
- class
- extends
- pixi.display.Sprite
- metadata
- :native
- "PIXI.Text"
Constructor
- parameters
text {String} The copy that you would like the text to display
[style] {TextStyle} The style parameters
[style.font] {String} default 'bold 20px Arial' The style and size of the font
[style.fill='black'] {String} A canvas fillstyle that will be used on the text e.g '#00FF00'
[style.align='left'] {String} Alignment for multiline text ('left', 'center' or 'right'), does not affect single line text
[style.stroke] {String} A canvas fillstyle that will be used on the text stroke e.g ''#FCFF00'
[style.strokeThickness=0] {Float} A number that represents the thickness of the stroke. Default is 0 (no stroke)
[style.wordWrap=false] {Bool} Indicates if word wrap should be used
[style.wordWrapWidth=100] {Float} The width at which text will wrap, it needs wordWrap to be set to true
[style.dropShadow=false] {Bool} Set a drop shadow for the text
[style.dropShadowColor='#000000'] {String} A fill style to be used on the dropshadow e.g 'red', '#00FF00'
[style.dropShadowAngle=Math.PI/4] {Number} Set a angle of the drop shadow
[style.dropShadowDistance=5] {Number} Set a distance of the drop shadow
- parameters
child {DisplayObject} The DisplayObject to add to the container
- parameters
child {DisplayObject} The child to add
index {Int} The index to place the child in
- parameters
[destroyBaseTexture] {Bool} whether to destroy the base texture as well
- parameters
resolution {Float} The resolution of the texture being generated
scaleMode {Int} Should be one of the PIXI.scaleMode consts
[renderer] {CanvasRenderer|WebGLRenderer} The renderer used to generate the texture.
- returns
- {Texture} a texture of the graphics object
- parameters
[matrix] {Matrix}
- returns
- {Rectangle} the rectangular bounding area
- parameters
index {Int} The index to get the child from
- returns
- {DisplayObject}
- parameters
name {String} The name of the child
- returns
- {DisplayObject}
- metadata
- :keep
- parameters
child {DisplayObject} The DisplayObject instance to identify
- returns
- {Int} The index position of the child display object to identify
- returns
- {Rectangle} the rectangular bounding area
- parameters
child {DisplayObject} The DisplayObject to remove
- parameters
index {Int} The index to get the child from
- parameters
beginIndex {Int} The beginning position. Predefined value is 0.
[endIndex] {Int} The ending position. Predefined value is children's array length.
- parameters
child {DisplayObject} The child DisplayObject instance for which you want to change the index number
index {Int} The resulting index number for the child display object
- parameters
stage {Stage} the stage that the object will have as its current stage reference
- parameters
style {TextStyle} The style parameters
[style.font] {String} default 'bold 20px Arial' The style and size of the font
[style.fill='black'] {String} A canvas fillstyle that will be used on the text e.g '#00FF00'
[style.align='left'] {String} Alignment for multiline text ('left', 'center' or 'right'), does not affect single line text
[style.stroke] {String} A canvas fillstyle that will be used on the text stroke e.g ''#FCFF00'
[style.strokeThickness=0] {Float} A number that represents the thickness of the stroke. Default is 0 (no stroke)
[style.wordWrap=false] {Bool} Indicates if word wrap should be used
[style.wordWrapWidth=100] {Float} The width at which text will wrap, it needs wordWrap to be set to true
[style.dropShadow=false] {Bool} Set a drop shadow for the text
[style.dropShadowColor='#000000'] {String} A fill style to be used on the dropshadow e.g 'red', '#00FF00'
[style.dropShadowAngle=Math.PI/4] {Number} Set a angle of the drop shadow
[style.dropShadowDistance=5] {Number} Set a distance of the drop shadow
- parameters
{String} text The copy that you would like the text to display
- parameters
texture {Texture} The PIXI texture that is displayed by the sprite
- parameters
child1 {DisplayObject}
child2 {DisplayObject}
- parameters
position {Point} The world origin to calculate from
- returns
- {Point} A point object representing the position of this object
- parameters
position {Point} The world origin to calculate from
[frm] {DisplayObject} The DisplayObject to calculate the global position from
- returns
- {Point} A point object representing the position of this object