I'm a little bit confuse. I was trying to make a button with non standard shape (the shape that is hard to create using Path2D or Shape).
I took image that has this shape. The image is, for example, 200x200 square with transparent parts.
So, when I am using hitTestPoint function is says 'yes' for all 200x200 pixels of my image. I was trying to use setBlendMode with masking, but it didn't help me.
I've managed to do this by using RenderTarget and modifying background of my image from transparent to black, but it doesn't seem to be the best way.
Do you have any suggestions? Maybe I've missed some simple solution?
P.S. My solution is in attachment