Re: [whatwg] Canvas isPointInPath() coordinate space

2010-07-15 Thread David Flanagan
Oliver Hunt wrote: On Jul 14, 2010, at 10:58 PM, David Flanagan wrote: So here's my question: if I want to do hit-testing as described above, do I need to take the mouse coordinates from the event, subtract the offset of the canvas, and then divide by 2? As the spec is written, I think I do

Re: [whatwg] Canvas isPointInPath() coordinate space

2010-07-14 Thread Oliver Hunt
On Jul 14, 2010, at 10:58 PM, David Flanagan wrote: > Here's another coordinate-space related question. > > I assume that the intended purpose of isPointInPath() is hit testing. You get > a click event on a canvas element, extract the mouse coordinates from the > event object, subtract the can

[whatwg] Canvas isPointInPath() coordinate space

2010-07-14 Thread David Flanagan
Here's another coordinate-space related question. I assume that the intended purpose of isPointInPath() is hit testing. You get a click event on a canvas element, extract the mouse coordinates from the event object, subtract the canvas position from them, and pass them to isPointInPath() to fi