Phaser API Documentation

  Version: 

Member of: Phaser.GameObjects

<static> GetTextSize(text, size, lines)

Description:

Returns an object containing dimensions of the Text object.

Parameters:

name type description
text Phaser.GameObjects.Text

The Text object to calculate the size from.

size Phaser.Types.GameObjects.Text.TextMetrics

The Text metrics to use when calculating the size.

lines Array.<string>

The lines of text to calculate the size from.

Returns:
Description:

An object containing dimensions of the Text object.

Since: 3.0.0