title: Hit detection for GWT canvas - which strategy for drawings?
body: <p>I'm creating some kind of drawings/flowchart/UML-diagram like tool with GWT Canvas (Java).
  For hit-detection of my drawings I could imagine 3 different strategies, but I do not know which would work best for my goal.</p>
  
  <ul>
  <li>Just keep track of all Shape coordinates and iterate all objects on mouseclick</li>
  <li>draw all objects on a ghost-canvas on mouseclick, and use isPointInPath() after every object drawing</li>
  <li>using a ghost-canvas and draw each object with its own color (like #000001, #000002), and keep reference of them in a Map. Then just detecting the mouseclick on the ghost-canvas and get the object belonging to the pixelcolor under mouse</li>
  </ul>
  
  <p>What would you prefer, and why?</p>