Re: hit testing and retained graphics

On Fri, 1 Jul 2011, Maciej Stachowiak wrote:
>
> Interesting idea. Explicit Path objects would be a useful addition to 
> the canvas API beyond hit testing. For example, you could easily 
> construct a path and reuse for drawing multiple time. This would require 
> the ability to stroke or fill paths given a path object in addition to 
> the hit testing support.
> 
> Personally I think it was an oversight in the original canvas API that 
> it only has a current path and not path objects. Many other graphics 
> APIs (including CoreGraphics, the API that inspired canvas) have 
> explicit objects for paths.

Path primitives are on the list of features for the next major set of 
feature additions to the 2D Canvas API. Making scripted hit-testing easier 
is one of the reasons (so you can create a path, then hit test against it 
in various places around the canvas).

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

Received on Saturday, 2 July 2011 06:46:15 UTC