lib/pixi/src/core/text/Text.js
function Text(text, style, resolution)
{
    /**
     * The canvas element that everything is drawn to
     *
     * @member {HTMLCanvasElement}
     */
    this.canvas = document.createElement('canvas');

    /**
     * The canvas 2d context that everything is drawn with
     * @member {HTMLCanvasElement}
     */
    this.context = this.canvas.getContext('2d');

    /**
     * The resolution of the canvas.
     * @member {number}
     */
    this.resolution = resolution || CONST.RESOLUTION;

    /**
     * Private tracker for the current text.
     *
     * @member {string}
     * @private
     */
    this._text = null;

    /**
     * Private tracker for the current style.
     *
     * @member {object}
     * @private
     */
    this._style = null;

    var texture = Texture.fromCanvas(this.canvas);
    texture.trim = new math.Rectangle();
    Sprite.call(this, texture);


    this.text = text;
    this.style = style;
}
function Text(text, style, resolution)
{
    /**
     * The canvas element that everything is drawn to
     *
     * @member {HTMLCanvasElement}
     */
    this.canvas = document.createElement('canvas');

    /**
     * The canvas 2d context that everything is drawn with
     * @member {HTMLCanvasElement}
     */
    this.context = this.canvas.getContext('2d');

    /**
     * The resolution of the canvas.
     * @member {number}
     */
    this.resolution = resolution || CONST.RESOLUTION;

    /**
     * Private tracker for the current text.
     *
     * @member {string}
     * @private
     */
    this._text = null;

    /**
     * Private tracker for the current style.
     *
     * @member {object}
     * @private
     */
    this._style = null;

    var texture = Texture.fromCanvas(this.canvas);
    texture.trim = new math.Rectangle();
    Sprite.call(this, texture);


    this.text = text;
    this.style = style;
}
function Text ( text , style , resolution ) { /**
     * The canvas element that everything is drawn to
     *
     * @member {HTMLCanvasElement}
     */ this . canvas = document . createElement ( 'canvas' ) ; /**
     * The canvas 2d context that everything is drawn with
     * @member {HTMLCanvasElement}
     */ this . context = this . canvas . getContext ( '2d' ) ; /**
     * The resolution of the canvas.
     * @member {number}
     */ this . resolution = resolution || CONST . RESOLUTION ; /**
     * Private tracker for the current text.
     *
     * @member {string}
     * @private
     */ this . _text = null ; /**
     * Private tracker for the current style.
     *
     * @member {object}
     * @private
     */ this . _style = null ; var texture = Texture . fromCanvas ( this . canvas ) ; texture . trim = new math . Rectangle ( ) ; Sprite . call ( this , texture ) ; this . text = text ; this . style = style ; }
A Text Object will create a line or multiple lines of text. To split a line you can use '\n' in your text string,
or add a wordWrap property set to true and and wordWrapWidth property with a value in the style object.

A Text can be created directly from a string and a style object

```js
var text = new PIXI.Text('This is a pixi text',{font : '24px Arial', fill : 0xff1010, align : 'center'});
```

@class
@extends Sprite
@memberof PIXI
@param text {string} The copy that you would like the text to display
@param [style] {object} The style parameters
@param [style.font] {string} default 'bold 20px Arial' The style and size of the font
@param [style.fill='black'] {String|Number} A canvas fillstyle that will be used on the text e.g 'red', '#00FF00'
@param [style.align='left'] {string} Alignment for multiline text ('left', 'center' or 'right'), does not affect single line text
@param [style.stroke] {String|Number} A canvas fillstyle that will be used on the text stroke e.g 'blue', '#FCFF00'
@param [style.strokeThickness=0] {number} A number that represents the thickness of the stroke. Default is 0 (no stroke)
@param [style.wordWrap=false] {boolean} Indicates if word wrap should be used
@param [style.wordWrapWidth=100] {number} The width at which text will wrap, it needs wordWrap to be set to true
@param [style.lineHeight] {number} The line height, a number that represents the vertical space that a letter uses
@param [style.dropShadow=false] {boolean} Set a drop shadow for the text
@param [style.dropShadowColor='#000000'] {string} A fill style to be used on the dropshadow e.g 'red', '#00FF00'
@param [style.dropShadowAngle=Math.PI/4] {number} Set a angle of the drop shadow
@param [style.dropShadowDistance=5] {number} Set a distance of the drop shadow
@param [style.padding=0] {number} Occasionally some fonts are cropped. Adding some padding will prevent this from happening
@param [style.textBaseline='alphabetic'] {string} The baseline of the text that is rendered.
@param [style.lineJoin='miter'] {string} The lineJoin property sets the type of corner created, it can resolve
spiked text issues. Default is 'miter' (creates a sharp corner).
@param [style.miterLimit=10] {number} The miter limit to use when using the 'miter' lineJoin mode. This can reduce
or increase the spikiness of rendered text.
A Text Object will create a line or multiple lines of text . To split a line you can use \ n in your text string or add a wordWrap property set to true and and wordWrapWidth property with a value in the style object .