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

Dirk Schulze dschulze at adobe.com
Wed Jan 9 22:36:59 PST 2013



On Jan 9, 2013, at 9:29 PM, "Rik Cabanier" <cabanier at gmail.com<mailto:cabanier at 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?

Greetings
Dirk


Rik

On Wed, Jan 9, 2013 at 6:18 PM, Dirk Schulze <dschulze at adobe.com<mailto:dschulze at 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



More information about the whatwg mailing list