From: Dirk Schulze <dschulze@adobe.com>

Date: Sat, 26 May 2012 16:37:10 -0700

To: Nikolas Zimmermann <zimmermann@kde.org>

CC: SVG public list <www-svg@w3.org>, "public-fx@w3.org" <public-fx@w3.org>

Message-ID: <0B635511-D395-447D-9475-D97EF222ED91@adobe.com>

Date: Sat, 26 May 2012 16:37:10 -0700

To: Nikolas Zimmermann <zimmermann@kde.org>

CC: SVG public list <www-svg@w3.org>, "public-fx@w3.org" <public-fx@w3.org>

Message-ID: <0B635511-D395-447D-9475-D97EF222ED91@adobe.com>

On May 26, 2012, at 3:10 PM, Nikolas Zimmermann wrote: > > Am 26.05.2012 um 18:56 schrieb Dirk Schulze: > >> Hi SVG folks, >> >> I have a question to by animations on transforms. See the simple example here: >> >> <rect width="100" height="100"> >> <animateTransform attributeName="transform" attributeType="XML" >> type="scale" by="1" dur="5s" fill="freeze"/> >> </rect> >> >> This example scales from 0 to 1, since the neutral element for scale is 0. This is relevant because of the definition in SMIL Animation: >> >> "" >> Normative: A by animation with a by value vb is equivalent to the same animation with a values list with 2 values, the neutral element for addition for the domain of the target attribute (denoted 0) and vb, andadditive="sum". Any other specification of the additive attribute in a by animation is ignored. >> "" [1] >> >> And according to SVG animation, the animated transform gets post multiplied to the userspace transform of the element (which is the identity matrix). >> >> My question is the following: Every transform function (independent if translate, scale or rotate) is just a shorthand for the underlaying transformation matrix (3x3/(3x2) or 4x4). Therefore, shouldn't the neutral element for addition on every transform function be the null matrix? If that is the case, what happens for the following example: > Fully agreed. > > Have a look at http://brian.sol1.net/svg/animatetransform-issues/by-animation-and-scale-transformations/ where this is also discussed, especially Olafs Comment below. > Note that WebKit recently switched to this interpretation as well, use the zero matrix and not the identity matrix as neutral element for addition. WebKit does it correctly for the first example now. That is correct. I am talking about the second example. Even WebKit is not using the zero matrix there. The rect is just translated, but not scaled. Of course it would also be possible to interpret the zero element dependent on the current transform function. For example: by transform on translate with the value by="100,100" is similar to: values="0,0;100,100" additive="sum" by transform on rotate with the value by="90" is similar to: values="0;90" additive="sum" by transform on scale with the value by="1" is similar to: values="0;1" additive="sum" For the first two by transforms, the corresponding transform matrix would be the identity matrix. For the last one it might be the null matrix (it is not obvious since graphic engines often just allow 3x2 matrices, where m_33 is 1 by default). I would be fine with that, but would like to define it explicitly. Greetings, Dirk > > Cheers, > Niko >Received on Saturday, 26 May 2012 23:37:51 UTC

*
This archive was generated by hypermail 2.3.1
: Wednesday, 7 January 2015 15:29:51 UTC
*