How to check if I clicked on the area of triangle's bitmap

I have a bitmap which is the shape of triangle.
The rest of this bitmap is the mask that is unvisible.
And my task is to detect if mouse has clicked on the area of this triangle or not.
Questions.
How to do it on easiest way ?
Can I use this bitmap as an object and just click on it ?
How to do it ?
How computer will know if I clicked on this triangle ?
I know position.
But what to do if the bitmap isn't a rectangle ?
Last edited on
Maybe you can get the pixel color where the mouse click occurs and check that?
Topic archived. No new replies allowed.