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

[CSS3-images] premultiplied alpha (was rotate(<angle>[, <translation-value>, <translation-value>]))

From: Rik Cabanier <cabanier@gmail.com>
Date: Tue, 21 Feb 2012 10:40:32 -0800
Message-ID: <CAGN7qDDC_nggwOO=rfB+UBPPULQOjaQgmVpxoyy=r9=T4y9DLw@mail.gmail.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: www-style list <www-style@w3.org>
>
>
> >
> > I suggest that if the extra two arguments are left in the spec (which
> > I'm still not a fan of), an extra special case be added to the
> > transitions part so that it works as expected.  Transitioning from
> > 'none' to rotate3d(0, 0, 1, 45deg) rotates only around the z-axis as
> > expected, and transitioning a color from green to transparent
> > shouldn't make it black in between even though you're technically
> > going from rgba(0, 128, 0, 1) to rgba(0, 0, 0, 0).  Likewise,
> > transitioning from none to rotate(45deg, 10px, 10px) should be treated
> > like transitioning from rotate(0deg, 10px, 10px).  Anything else is
> > not expected, IMO.
>
> Note that we fixed the color transition by specifying that it happens
> in premultiplied space; that's not the same thing as what you're
> asking for.
>
> However, I think what you're asking for is reasonable.
>
>
Hi Tab,

specifying premultiplied alpha to fix the issue seems odd.
It seems that the issue is really how to you handle the  'transparent'
keyword. Because transparent is specified as (0,0,0,0) you transition the
color values  as well.
So, non-premultiplied red->transparent, the midpoint of your gradient
becomes (0, .5, 0, .5) which after compositing with white becomes (.5, .75,
.5) which is too dark.
In premultiplied space, you end up with (.5, 1, .5) which is what you want.

However by forcing premultiplied space, you can no longer go from 'yellow'
to 'transparent red' because the 'red' value is removed when you multiply
by 0.

Was this discussed and deemed OK? I tried to find it in the archives but
couldn't find it.
Sorry if this was already decided.

Rik
Received on Tuesday, 21 February 2012 18:40:59 GMT

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