[whatwg] isPointInPath v. set of pixels in canvas hit regions

Ian Hickson ian at hixie.ch
Fri Jul 6 11:24:42 PDT 2012


On Thu, 5 Jul 2012, Charles Pritchard wrote:
> On Jul 5, 2012, at 10:06 PM, Ian Hickson <ian at hixie.ch> wrote:
> >> 
> >> I think its up to the author to manage their set of paths 
> >> appropriately, independently from the drawing operations.
> > 
> > Having the drawing mechanism work in a tightly integrated fashion with 
> > the region code IMHO helps authors avoid bugs. You don't have to track 
> > which regions you've defined, you just make sure to draw the regions 
> > while you're drawing the paths and it all Just Works. Not having to 
> > track the regions is the entire point of how this API was designed -- 
> > it's also the main differentiating factor between this API's design 
> > and the design of hit testing in retained-mode APIs such as SVG.
> 
> It's a poor design you've settled on: the purpose of these methods is to 
> associate path information with DOM nodes.

Oh, no, not at all. That's at best a minor use case compared to the main 
bulk of the use cases for this feature.

I encourage you to read the e-mail that introduced these features a few 
weeks ago, where I go into much more detail about the design.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'



More information about the whatwg mailing list