W3C home > Mailing lists > Public > whatwg@whatwg.org > January 2013

Re: [whatwg] Canvas: compositing and blending operator as enumeration?

From: Dirk Schulze <dschulze@adobe.com>
Date: Thu, 10 Jan 2013 11:20:42 -0800
To: Rik Cabanier <cabanier@gmail.com>
Message-ID: <3B7BF7C5-ECCB-401B-BAF5-9DED7C4280D0@adobe.com>
Cc: WHATWG List <whatwg@whatwg.org>

On Jan 10, 2013, at 8:10 AM, Rik Cabanier <cabanier@gmail.com> wrote:

> 
> 
> On Wed, Jan 9, 2013 at 10:36 PM, Dirk Schulze <dschulze@adobe.com> wrote:
> 
> 
> On Jan 9, 2013, at 9:29 PM, "Rik Cabanier" <cabanier@gmail.com> wrote:
> 
>> Hi Dirk,
>> 
>> the 'globalCompositeOperation' property takes the same syntax as the css 'mix' so I don't think an enum will work.
>> 
> 
> I am not following. What does the CSS property have to do with the canvas attribute?
> 
> 
> See the spec: https://dvcs.w3.org/hg/FXTF/rawfile/tip/compositing/index.html#canvascompositingandblending
> For consistency, people wanted the same syntax for canvas and css.
>  

That is fine for me. I am not asking for different values or keyword names :P

Dirk

> 
>> Rik
>> 
>> On Wed, Jan 9, 2013 at 6:18 PM, Dirk Schulze <dschulze@adobe.com> wrote:
>> Hi,
>> 
>> After all the discussions about winding rules and the new introduced enumeration for "nonzero" and "even odd", I wonder if the the compositing and blending modes should be two enumerations as well.
>> 
>> enum CanvasCompositingMode {
>>         "source-over",
>>         "source-in",
>>         
>> }
>> 
>> and
>> 
>> enum CanvasBlendingMode {
>>         "normal",
>>         "multiply",
>>         ...
>> }
>> 
>> This wouldn't actually change the behavior or definition a lot, but might help to cleanup a bit. I am happy about other names if they are not good enough.
>> 
>> Greetings,
>> Dirk
>> 
> 
Received on Thursday, 10 January 2013 19:21:28 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 30 January 2013 18:48:12 GMT