RE: hit testing and retained graphics

Microsoft considers SVG to be the correct way to do retained mode graphics. We have no plans to add retained capabilities to the immediate mode canvas API. If SVG doesn’t address the problem then effort would be better expended on fixing that problem.

Thanks
Frank


From: Richard Schwerdtfeger [mailto:schwer@us.ibm.com] 
Sent: Thursday, June 23, 2011 2:29 PM
To: Tab Atkins Jr.
Cc: Cameron McCormack; Charles Pritchard; Cynthia Shelly; david.bolter@gmail.com; Frank Olivier; Mike@w3.org; public-canvas-api@w3.org; public-html@w3.org; public-html-a11y@w3.org
Subject: Re: hit testing and retained graphics

Hi Tab,

We are trying to make canvas accessible and we are trying to provide hit testing support in canvas vs. throwing out canvas for SVG. SVG has a VERY long way before it is accessible and canvas developers, who have canvas implementations, don't want to throw all their work away to get hit testing by using SVG.

I have a very large IBM application in development and SVG given the state of SVG accessibility and how the application is constructed it is not a good fit. I also have a commitment to ensure HTML 5 is fully accessible, as part of the HTML accessibility task force effort, and we need to make magnifiers aware of drawing object location and dimensions in canvas.

Also, there is a need to have hit testing support in canvas and I am trying to marry an accessibility feature with a mainstream feature developers need.

I had suggested full retained mode graphics by creating drawing objects that would inherit the 2d Context API of canvas, however the discussion on the list was indicated that was more than people wanted. So a subset of retained mode graphics using draw paths to form the bounds of objects is where the discussion is currently. Things like font, brush, or other retained mode features would be left to the canvas context as is. 

Rich 


Rich Schwerdtfeger
CTO Accessibility Software Group

"Tab Atkins Jr." ---06/23/2011 03:30:32 PM---On Thu, Jun 23, 2011 at 12:56 PM, Richard Schwerdtfeger <schwer@us.ibm.com> wrote:

From: "Tab Atkins Jr." <jackalmage@gmail.com>
To: Richard Schwerdtfeger/Austin/IBM@IBMUS
Cc: Cameron McCormack <cam@mcc.id.au>, Charles Pritchard <chuck@jumis.com>, Cynthia Shelly <cyns@microsoft.com>, david.bolter@gmail.com, Frank Olivier <Frank.Olivier@microsoft.com>, Mike@w3.org, public-canvas-api@w3.org, public-html@w3.org, public-html-a11y@w3.org
Date: 06/23/2011 03:30 PM
Subject: Re: hit testing and retained graphics
________________________________________



On Thu, Jun 23, 2011 at 12:56 PM, Richard Schwerdtfeger
<schwer@us.ibm.com> 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?

~TJ

Received on Thursday, 23 June 2011 23:30:09 UTC