Difference between revisions of "Sprite:hitTestPoint"

From GiderosMobile
(remove language stuff)
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
<languages />
+
'''Available since:''' Gideros 2011.6<br/>
'''<translate>Available since</translate>:''' Gideros 2011.6<br/>
+
'''Class:''' [[Sprite]]<br/>
'''<translate>Class</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/>
+
 
=== <translate>Description</translate> ===
+
=== Description ===
<translate><br />
+
Checks whether the given coordinates (in global coordinate system) is in bounds of the sprite.
Checks whether the given coordinates (in global coordinate system) is in bounds of the sprite.<br />
 
<br />
 
<br /></translate>
 
 
<source lang="lua">
 
<source lang="lua">
 
(bool) = Sprite:hitTestPoint(x,y,shapeFlag)
 
(bool) = Sprite:hitTestPoint(x,y,shapeFlag)
 
</source>
 
</source>
=== <translate>Parameters</translate> ===
+
 
'''x''': (number) <translate></translate> <br/>
+
=== Parameters ===
'''y''': (number) <translate></translate> <br/>
+
'''x''': (number) the x coordinate to test<br/>
'''shapeFlag''': (bool) <translate>Take hidden, clipping/masking into consideration when testing hit point</translate> '''optional'''<br/>
+
'''y''': (number) the y coordinate to test<br/>
=== <translate>Return values</translate> ===
+
'''shapeFlag''': (bool) is hidden, clipping/masking, taken into consideration when testing hit point? '''optional'''<br/>
'''<translate>Returns</translate>''' (bool) <translate>''true'' if the given global coordinates are in bounds of the sprite, ''false'' otherwise.</translate><br/>
+
 
 +
=== Return values ===
 +
'''Returns''' (bool) ''true'' if the given global coordinates are in bounds of the sprite, ''false'' otherwise<br/>
  
 
{{Sprite}}
 
{{Sprite}}

Revision as of 09:34, 6 January 2021

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) the x coordinate to test
y: (number) the y coordinate to test
shapeFlag: (bool) is hidden, clipping/masking, taken 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