W3C home > Mailing lists > Public > whatwg@whatwg.org > March 2014

Re: [whatwg] Canvas Path.addPath SVGMatrix not optimal?

From: Justin Novosad <junov@google.com>
Date: Thu, 20 Mar 2014 11:45:46 -0400
Message-ID: <CABpaAqSDs9fsUzs0tgGKJAn0TpQm3=Ru7YTjQez_Bwra7vZjVg@mail.gmail.com>
To: Rik Cabanier <cabanier@gmail.com>
Cc: Dirk Schulze <dschulze@adobe.com>, whatwg <whatwg@lists.whatwg.org>
On Thu, Mar 20, 2014 at 11:23 AM, Rik Cabanier <cabanier@gmail.com> wrote:

>
>
>
> On Thu, Mar 20, 2014 at 7:01 AM, Justin Novosad <junov@google.com> wrote:
>
>>
>>
>>
>> On Wed, Mar 19, 2014 at 5:47 PM, Rik Cabanier <cabanier@gmail.com> wrote:
>>
>>>
>>> On Wed, Mar 19, 2014 at 2:22 PM, Justin Novosad <junov@google.com>wrote:
>>>
>>>>
>>>> I agree it should be optional, but just to play devil's advocate : you
>>>> can
>>>> create an identity SVGMatrix with a simpler bit of code. Just do this
>>>> right
>>>> after creating a canvas rendering context: var identity =
>>>> context.currentTransform;
>>>>
>>>
>>> Hi Justin,
>>>
>>> did Blink already expose this property?
>>>
>>
>> It is implemented, but not exposed (hidden behind the experimental canvas
>> features flag)
>>
>>
>>> As currently specified, this must return a live SVGMatrix object,
>>> meaning that as you change the CTM on the 2d context, your reference to the
>>> SVGMatrix should change as well. [1]
>>>
>>
>> D'oh! I totally missed that when I reviewed the implementation. In fact,
>> the implementer even went to great length to ensure the opposite behavior
>> (making a copy).
>> https://codereview.chromium.org/24233004
>> I'll make sure that gets fixed.
>>
>
> By "fixed", do you mean you will return a reference or change the name of
> the API? :-)
>

I have no overwhelmingly strong motives to pick one over the other, so what
I meant by "fix" is for the implementation follow the spec, whether we
change it or not.  I'll make sure we don't ship it until this discussion is
over.
If no browser has exposed this yet, we can still go back without causing
anyone any pain.
Received on Thursday, 20 March 2014 16:54:58 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 17:00:17 UTC