Shape:testPoint( x, y )
Checks whether a point lies inside the shape.
This is particularly useful for mouse interaction with the shapes. By looping through all shapes and testing the mouse position with this function, we can find which shapes the mouse touches.
Synopsis
hit = Shape:testPoint( x, y )
Parameters
x |
number |
The x-component of the point. |
y |
number |
The y-component of the point. |
Returns
hit |
boolean |
True if inside, false if outside |