Re: [css-compositing] some proposals

On Tue, Nov 22, 2011 at 1:50 PM, Cyril Concolato <
Cyril.Concolato@cisra.canon.com.au> wrote:

> Hi Alex,
>
> Thank you for your answer. See my comments below.
>
> -----Original Message-----
> From: Alex Danilo [mailto:alex@abbra.com]
> Sent: Tuesday, 22 November 2011 1:01 PM
> To: www-svg@w3.org; public-fx@w3.org
> Subject: RE: [css-compositing] some proposals
>
> --
> NB: Sorry for the spam www-svg (note to self: debug mailer agent;-(
> --
> Hi Cyril & Rik,
>
>        Sorry I've been a bit busy of late so following up now.
>
>        First, one thing that's been missed is that in Porter-Duff the
> alpha channel represents a mask. The crux of the original paper is
> representing what happens with shape overlap on a pixel and so in the
> compositing spec. we reproduce the 'square with 4 areas'
> that has the top section multi-coloured, the left yellow, the right blue
> and the bottom white.
>
>        Those areas represent 0, A, B, and AB in the original P-D paper.
>
>        In the spec. further down where it says:
> "The operation used to place objects onto the background is as follows"
>
> there are these equations:
> Dca' = f(Sc, Dc) × Sa × Da  + Y × Sca × (1-Da)  + Z × Dca × (1-Sa)
> Da'  =         X × Sa × Da  + Y × Sa × (1-Da)   + Z × Da × (1-Sa)
>
>        The Porter-Duff mode chosen affects X, Y, and Z.
>
>        The blend mode is f(Sc, Dc).
> [Cyril] So I understand that the proposal to split the modes into two
> parts (P-D and blending) is purely syntactic sugar and it does not change
> the model, right?
>
>        So for example if you chose blend-mode:multiply, comp-op:src-in;
> you would get:
>
> f(Sc,Dc) = Sc × Dc
> X        = 1
> Y        = 0
> Z        = 0
> [Cyril] According to the current draft: src-in  is f(Sc,Dc)=Sc and X=1 and
> Y=Z=0. Multiply is f(Sc,Dc)=Sc x Dc and X=Y=Z=1. So you are saying that
> when you use both the compositing and the blending modes, you keep the
> value of f(Sc,Dc) from the blending and you keep the X, Y, Z values from
> the compositing mode. It make sense but it's not obvious. I would have
> thought that you would somehow compose them. Anyway, I think that if we
> split the spec, the merging of equation needs to be documented.
>
>
The model is that you calculate the blended image first (= f(Sc, Dc)) and
then composite it with whatever mode was specified.
The current spec always assumes that you do src-over with blending and that
is changing.
So in the new spec:
- multiply becomes f(Sc,Dc)=Sc x Dc (no more x, y, z)
- src-in becomes X=1, Y=Z=0 (no more f(Sc, Dc))

Rik

Received on Tuesday, 22 November 2011 23:18:33 UTC