W3C home > Mailing lists > Public > www-style@w3.org > April 2014

Re: [css-masking] mask-composite, vocabulary, and use cases

From: Dirk Schulze <dschulze@adobe.com>
Date: Tue, 29 Apr 2014 18:19:08 +0000
To: Rik Cabanier <cabanier@gmail.com>
CC: fantasai <fantasai.lists@inkedblade.net>, "www-style@w3.org" <www-style@w3.org>
Message-ID: <A98BFAAA-2566-4FFA-B6C9-0BE4B870D30A@adobe.com>
Hi,

I replaced the old composting keywords with the new keywords discussed in below. I added more normative text that describes the behavior. Especially the behavior on multiple mask layers. New examples show demonstrate the use cases for each keyword.

Greetings,
Dirk

On Apr 24, 2014, at 6:23 PM, Rik Cabanier <cabanier@gmail.com> wrote:

> 
> 
> 
> On Thu, Apr 24, 2014 at 3:47 AM, Dirk Schulze <dschulze@adobe.com> wrote:
> 
> On Apr 23, 2014, at 11:31 AM, Dirk Schulze <dschulze@adobe.com> wrote:
> 
> >
> > On Apr 23, 2014, at 10:00 AM, fantasai <fantasai.lists@inkedblade.net> wrote:
> >
> >> I'm looking at
> >>
> >> mask-composite: clear | copy | destination | source-over | destination-over
> >>                 | source-in | destination-in | source-out | destination-out
> >>                 | source-atop | destination-atop | xor | lighter
> >>
> >> and the syntax is completely arcane to me. The examples make sense.
> >> But I'm not a graphics-library person, so I can't relate to the
> >> vocabulary in use here.
> >>
> >> Do we have to use Porter-Duff vocabulary, or would it be okay to use
> >> more vernacular English for some of these terms? E.g. "source" and
> >> "destination" mean nothing to me in terms of CSS objects, so I can't
> >> tell what they correspond to.
> 
> I looked more into the behavior of authoring tools. A common pattern seems to be the following:
> 
> combine/add     ->      source-over (normal painting)
> subtract                ->      source-out
> intersect               ->      source-in
> exclude         ->      xor
> 
> + 1. 
> This is much better than the non-descriptive porter-duff names. 
>  
> Tools are inconsistent with the use of add or combine. I slightly prefer combine.
> 
> I like 'add' a bit more as 'combine' is longer to type and not as clear.
>  
> I didnít find examples for source-atop neither in content nor in authoring tools. Maybe it is not that common and could be added later if necessary.
> 
> It is important to understand that the keywords make a lot of sense for content that is either opaque or transparent. For half transparent shapes, the operations are similar to what can be seen here [1] (blue filled rect is destination, red stroked rect source). Either source or destination would still shine through. That is expected and even the case for xor. Therefore, I do not see a problem with the names subtract and intersect.
> 
> I will do the changes in the next days.
> 
> Greetings,
> Dirk
> 
> [1] https://bug-66762-attachments.webkit.org/attachment.cgi?id=104816
> 
> 
> 
> 
> 
Received on Tuesday, 29 April 2014 18:19:36 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:21 UTC