I've drawn a GeneralPath that represents a mean on a chart. Now what i need is detecting when the mouse is near it: i've used Line2d.segDist to detect if the mouse is near a Line2D object. Is there something similar for GeneralPath?
Asked
Active
Viewed 232 times
1 Answers
3
Using Stroke.createStrokedShape you can detect it for every Path2D object in a generic way (GeneralPath is a subclass of Path2D), see my answer for a similar question here: Mouse pointer detection over a Path2D