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

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