[whatwg] CanvasRenderingContext2D with addPath, currentPath
dschulze at adobe.com
Mon Nov 4 10:36:48 PST 2013
On Nov 3, 2013, at 3:22 PM, Glenn Maynard <glenn at zewt.org> wrote:
> On Sat, Nov 2, 2013 at 9:03 PM, Rik Cabanier <cabanier at gmail.com> wrote:
>>> Does this mean that ctx.currentPath != ctx.currentPath?
>>> That's bad!
>> Why would it be bad (apart from being different)?
> It's strange to say "foo.bar.baz = 1" (ctx.currentPath.baz = 1), and for
> foo.bar.baz to not be 1 the next time you look. It's also confusing if you
> use it as a Map key.
I think the problem that the UA would be focused with is the following:
var path = ctx1.currentPath;
ctx2.currentPath = path;
ctx2.currentPath = ctx1.currentPath
Both contexts could manipulate the same path and both can have different CTMs which also change independent of each other. Mixing that up could cause a huge mess.
That is one of the reasons why WebKit creates copies.
More information about the whatwg