- From: Rik Cabanier <cabanier@gmail.com>
- Date: Sat, 10 Nov 2012 20:13:45 -0800
- To: Simon Sapin <simon.sapin@kozea.fr>
- Cc: www-style list <www-style@w3.org>
- Message-ID: <CAGN7qDBKEq6ugELbcMgr=wk5wbGZNaMPvToy1Cpv=EHPzwbgTg@mail.gmail.com>
On Sat, Nov 10, 2012 at 2:10 PM, Simon Sapin <simon.sapin@kozea.fr> wrote: > Hi, > > css3-transforms recently got a change to specify more precisely the > multiplication order of transformation matrices: > > http://dvcs.w3.org/hg/csswg/**rev/a88c3b8d6b27<http://dvcs.w3.org/hg/csswg/rev/a88c3b8d6b27> > > This is good, but still somewhat ambiguous: matrix multiplication is not > commutative, A * B is not always the same as B * A. > > §6 says: > > Multiply by each of the transform functions in ‘transform’ property from >> left to right >> > > Is this a left-multiply or a right multiply? In other words, which of > these is correct? > > accumulator = accumulator * to_matrix(function) > or > accumulator = to_matrix(function) * accumulator > It's always left to right so: accumulator = accumulator * to_matrix(function) > > > I remember trying stuff blindly and comparing with other engines in order > to get this right in WeasyPrint… > > Similar questions arise with nested "transformed" stacking contexts or > anywhere an implementation would multiply matrices. It might just be me who > is confused, but the spec could still be more explicit than it is currently. > Is your confusion with preserver-3d or with regular 2d transforms? In the case of 2d, the outer transform happens first (= to the left) > > Thanks, > -- > Simon Sapin > >
Received on Sunday, 11 November 2012 04:14:13 UTC