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.

{{notice|There's a bug in [[0.8.0]] preventing this function from working.}}

== Function ==
{{newin|[[0.8.0]]|080|type=variant}}
=== Synopsis ===
<source lang="lua">
hit = Shape:testPoint( tx, ty, tr, x, y )
</source>
=== Arguments ===
{{param|number|tx|Translates the shape along the x-axis.}}
{{param|number|ty|Translates the shape along the y-axis.}}
{{param|number|tr|Rotates the shape.}}
{{param|number|x|The x-component of the point.}}
{{param|number|y|The y-component of the point.}}
=== Returns ===
{{param|boolean|hit|True if inside, false if outside}}

== Function ==
{{oldin|[[0.8.0]]|080|type=variant}}
=== Synopsis ===
<source lang="lua">
hit = Shape:testPoint( x, y )
</source>
=== Arguments ===
{{param|number|x|The x-component of the point.}}
{{param|number|y|The y-component of the point.}}
=== Returns ===
{{param|boolean|hit|True if inside, false if outside}}
== See Also ==
* [[parent::Shape]]
[[Category:Functions]]
{{#set:Description=Checks whether a point lies inside the shape.}}
{{#set:Since=000}}
== Other Languages ==
{{i18n|Shape:testPoint}}