Difference between revisions of "Sprite:getBounds"

From GiderosMobile
(Created page with "__NOTOC__ '''Available since:''' Gideros 2011.6<br/> === Description === <br /> Returns a rectangle (as x, y, width and height) that encloses the sprite as it appears in anoth...")
 
Line 6: Line 6:
 
<br />
 
<br />
 
<source lang="lua">
 
<source lang="lua">
(number) (number) (number) (number), = Sprite:getBounds(targetSprite,)
+
(number), (number), (number), (number) = Sprite:getBounds(targetSprite)
 
</source>
 
</source>
'''targetSprite:''' (Sprite) the sprite that defines the other coordinate system to transform ''''''<br/>
+
'''targetSprite''': (Sprite) the sprite that defines the other coordinate system to transform ''''''<br/>
 
'''Returns''' (number) x coordinate<br/>
 
'''Returns''' (number) x coordinate<br/>
 
'''Returns''' (number) y coordinate<br/>
 
'''Returns''' (number) y coordinate<br/>
 
'''Returns''' (number) width of Sprite<br/>
 
'''Returns''' (number) width of Sprite<br/>
 
'''Returns''' (number) height of Sprite<br/>
 
'''Returns''' (number) height of Sprite<br/>

Revision as of 10:21, 23 August 2018

Available since: Gideros 2011.6

Description


Returns a rectangle (as x, y, width and height) that encloses the sprite as it appears in another sprite's coordinate system.

(number), (number), (number), (number) = Sprite:getBounds(targetSprite)

'targetSprite: (Sprite) the sprite that defines the other coordinate system to transform '
Returns (number) x coordinate
Returns (number) y coordinate
Returns (number) width of Sprite
Returns (number) height of Sprite