Shape:testPoint
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.
hit = Shape:testPoint( tx, ty, tr, x, y )
tx number Translates the shape along the x-axis.
ty number Translates the shape along the y-axis.
tr number Rotates the shape.
x number The x-component of the point.
y number The y-component of the point.
hit boolean True if inside, false if outside