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

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

From: Rik Cabanier <cabanier@gmail.com>
Date: Thu, 24 Apr 2014 09:23:03 -0700
Message-ID: <CAGN7qDC+KeRmOZqCtscUUtZb4PuRR-eUvu_QiO4e8K79VGzh2w@mail.gmail.com>
To: Dirk Schulze <dschulze@adobe.com>
Cc: fantasai <fantasai.lists@inkedblade.net>, "www-style@w3.org" <www-style@w3.org>
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 Thursday, 24 April 2014 16:23:36 UTC

This archive was generated by hypermail 2.4.0 : Monday, 23 January 2023 02:14:39 UTC