Phaser API Documentation

  Version: 
getTextBounds([round])

Description:

Calculate the bounds of this Bitmap Text.

An object is returned that contains the position, width and height of the Bitmap Text in local and global contexts.

Local size is based on just the font size and a [0, 0] position.

Global size takes into account the Game Object's scale, world position and display origin.

Also in the object is data regarding the length of each line, should this be a multi-line BitmapText.

Parameters:

name type arguments Default description
round boolean <optional> false

Whether to round the results up to the nearest integer.

Returns:
Description:

An object that describes the size of this Bitmap Text.