Re: hit testing and retained graphics

On Thu, 23 Jun 2011 22:28:32 +0200, Tab Atkins Jr. <>  

> On Thu, Jun 23, 2011 at 12:56 PM, Richard Schwerdtfeger
> <> wrote:
>>> So normally, I imagine, hit testing would be done either by using
>>> isPointInPath() or by custom code looking at a mouse event’s x/y  
>>> values.
>>> I think this proposal doesn’t work with isPointInPath(), though, is  
>>> that
>>> right?
>> I think it would but we would need to incorporate Z order and a notion  
>> of the last drawn element to compute which element is on top. The user  
>> agent would need to manage this.
> You are attempting to recreate a retained-mode API in an
> immediate-mode API.  Why is "use SVG" not sufficient for this?

Because people don't - they use canvas instead. If that were not the case,  
the whole effort to specify canvas would be solving a theoretical problem.

Given that there is canvas content, and that it is often interactive, you  
can make it possible to make it accessible, or tell people "you better  
hope that somebody bothers to make an equivalent version in a different  
technology". The former is hard work, and only likely to happen in a very  
few cases. The latter is much harder, and only likely to happen in a small  
fraction of the cases it would be done for the former.



Charles McCathieNevile  Opera Software, Standards Group
     je parle français -- hablo español -- jeg lærer norsk       Try Opera:

Received on Monday, 27 June 2011 11:21:41 UTC