W3C home > Mailing lists > Public > www-style@w3.org > July 2012

Re: [css-compositing] How do 'alpha-compositing' and 'blend-mode' interact?

From: Rik Cabanier <cabanier@gmail.com>
Date: Sat, 21 Jul 2012 13:17:44 -0700
Message-ID: <CAGN7qDAopuBzxpMQe9_YLkgWnFNeRLzWweMx_vCBPphi4nPDYg@mail.gmail.com>
To: Maciej Stachowiak <mjs@apple.com>
Cc: www-style list <www-style@w3.org>
Hi Maciej,


On Sat, Jul 21, 2012 at 11:21 AM, Maciej Stachowiak <mjs@apple.com> wrote:

>
> How do 'alpha-compositing' and 'blend-mode' interact if you have set both?
> I was unable to determine this from the spec. Does it actually make sense
> to specify both to non-default values at the same time? I was unable to
> understand what their relationship is supposed to be.
>

blending and compositing are 2 separate operations.
Blending takes the foreground and background pixels, mixes them together
and produces a new image.
This image is then composited with whatever compositing mode you have set.

The 2 operations do not interact.

Most implementations (including Apple's core graphics and Adobe PDF) always
assume 'src-over' after blending.

>
> Some other comments:
>
> - The property values for the 'alpha-compositing' operator are
> inconsistent with the values for HTML5 Canvas: <
> http://www.w3.org/TR/2dcontext/#dom-context-2d-globalcompositeoperation>.
> I suggest making them match if there is no compelling advantage to the new
> names, otherwise this will be needlessly confusing to authors.
>

That's correct. We reused the names that were in the SVG compositing spec.
It think we can make them longer, but I'd prefer to keep 'plus' instead of
'lighter' because 'lighter' sounds too much like the 'lighten' blend mode.
'clear' also seems absent in the canvas spec...

>
> - Consider renaming 'alpha-compositing' to 'composite-operator' for
> similar reasons.
>
>
'alpha-compositing' was a suggestion from Chris Marrin and people on the
mailing list liked it so I added it to the spec. (It was originally
'comp-op')
Received on Saturday, 21 July 2012 20:18:13 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:57 GMT