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

Re: [css3-transforms] Multiplication order

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Mon, 12 Nov 2012 12:23:41 -0800
Message-ID: <50A15ACD.3030100@mit.edu>
To: Dirk Schulze <dschulze@adobe.com>
CC: "www-style@w3.org" <www-style@w3.org>
On 11/12/12 10:56 AM, Dirk Schulze wrote:
> 2. Translate by the computed X, Y and Z values of ‘transform-origin’
> 	Create a translation matrix and multiply with I: T = I * Trans

We're good so far.

> 3. Multiply by each of the transform functions in ‘transform’ property from left to right
> 	T = I * Trans * A * B * C

The problem is that "multiply" could easily mean left-multiplication, 
which would give:

   T = C * B * A * I * Trans

What we need to clarify is that this is not what happens.

> 4. Translate by the negated computed X, Y and Z values of ‘transform-origin’
> 	T = I * Trans * A * B * C * TransBack

And here it needs to be made clear that this is what happens, and not

   T = TransBack * I * Trans * A * B * C

For what it's worth, your phrasing in the mail I'm replying to is _much_ 
better than what's in the spec right now.

> Is the part that confuses you the part with A * B * C?

No, it's the part about how "left to right" and "multiply" interact. 
The obvious meaning to me there is that you take the matrices one by 
one, in left to right order, and multiply by them.  But then you need to 
say which side you multiply by them on.

> Or how to multiply these transformation matrices to the identical transform with the translation (I * Trans * A * B * C)? Do you disagree with the order in general?

I agree with the order.  It just needs to be made clear.

-Boris
Received on Monday, 12 November 2012 20:24:12 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:21:02 GMT