How do I create an object with irregular graphics, such as a Pentagon?

I created a graphic object, and made it a button, my figure is Pentagon, but when I press the blank area next to the Pentagon, he will still trigger events, although there are not what is, the actual volume button rectangle in corona inside, I want more accurate click, I tried deformation, deformation is still only 4 points, it is clear that this is not what I want, the way to achieve my idea?I don’t want him to have an event on the red area

You can create a Polygon shape and use that as the touch area. So you got two objects, 1 is the graphic and the other one is the shape for the touch event.

https://docs.coronalabs.com/api/library/display/newPolygon.html

Another approach would be to create a Polygonshape and fill it with the grahic you want to use. This way you only got one graphic object afterwards.

https://docs.coronalabs.com/api/type/ShapeObject/fill.html

Consider using histmasking

I have an example in the ‘Ask Ed’ section of my Free Stuff archive.

This is a old accompanying video for the above code sample

https://www.youtube.com/watch?v=JkV1i6z7xUg

You can create a Polygon shape and use that as the touch area. So you got two objects, 1 is the graphic and the other one is the shape for the touch event.

https://docs.coronalabs.com/api/library/display/newPolygon.html

Another approach would be to create a Polygonshape and fill it with the grahic you want to use. This way you only got one graphic object afterwards.

https://docs.coronalabs.com/api/type/ShapeObject/fill.html

Consider using histmasking

I have an example in the ‘Ask Ed’ section of my Free Stuff archive.

This is a old accompanying video for the above code sample

https://www.youtube.com/watch?v=JkV1i6z7xUg