Button#getBounds()

getBounds(matrix) → {Rectangle}

Returns the bounds of the Sprite as a rectangle.
The bounds calculation takes the worldTransform into account.

It is important to note that the transform is not updated when you call this method.
So if this Sprite is the child of a Display Object which has had its transform
updated since the last render pass, those changes will not yet have been applied
to this Sprites worldTransform. If you need to ensure that all parent transforms
are factored into this getBounds operation then you should call updateTransform
on the root most object in this Sprites display list first.

Parameters
Name Type Description
matrix Matrix

the transformation matrix of the sprite

Returns
Rectangle -

the framing rectangle

Inherited From
Source code: pixi/display/Sprite.js (Line 199)
doc_phaser
2017-02-14 10:39:09
Comments
Leave a Comment

Please login to continue.