Difference between revisions of "Sprite:hitTestPoint"

From GiderosMobile
Line 14: Line 14:
 
'''x''': (number) <translate></translate> <br/>
 
'''x''': (number) <translate></translate> <br/>
 
'''y''': (number) <translate></translate> <br/>
 
'''y''': (number) <translate></translate> <br/>
'''shapeFlag''': (bool) <translate>Take clipping/masking into consideration when testing hit point</translate> '''optional'''<br/>
+
'''shapeFlag''': (bool) <translate>Take hidden, clipping/masking into consideration when testing hit point</translate> '''optional'''<br/>
 
=== <translate>Return values</translate> ===
 
=== <translate>Return values</translate> ===
 
'''<translate>Returns</translate>''' (bool) <translate>''true'' if the given global coordinates are in bounds of the sprite, ''false'' otherwise.</translate><br/>
 
'''<translate>Returns</translate>''' (bool) <translate>''true'' if the given global coordinates are in bounds of the sprite, ''false'' otherwise.</translate><br/>

Revision as of 17:27, 17 December 2018


Available since: Gideros 2011.6
Class: Sprite

Description


Checks whether the given coordinates (in global coordinate system) is in bounds of the sprite.


(bool) = Sprite:hitTestPoint(x,y,shapeFlag)

Parameters

x: (number)
y: (number)
shapeFlag: (bool) Take hidden, clipping/masking into consideration when testing hit point optional

Return values

Returns (bool) true if the given global coordinates are in bounds of the sprite, false otherwise.