I’m creating a java desktop application that draws a map in a JFrame designing a country at a time.
After closing the region region.closePath(); I need to know if a point is inside the region last drawn.
In JavaScript, there was the element canvas2d the function isPointInPath(x, y).
Is there something similar in java Graphics2D?
In my situation i was using the setTransform method.
So, to contains method works correctly, i had to convert the point to the correct proportion of matrix.
Like that: