getBounds(rect) → {Phaser.Rectangle}
Scans the BitmapData and calculates the bounds. This is a rectangle that defines the extent of all non-transparent pixels.
The rectangle returned will extend from the top-left of the image to the bottom-right, excluding transparent pixels.
Parameters
| Name | Type | Argument | Description | 
|---|---|---|---|
rect |  Phaser.Rectangle |  <optional> |  If provided this Rectangle object will be populated with the bounds, otherwise a new object will be created.  |  
Returns
A Rectangle whose dimensions encompass the full extent of non-transparent pixels in this BitmapData.
- Source code: gameobjects/BitmapData.js (Line 1151)
 
Please login to continue.