Re: animateTransform nad by-transformation

Daniel Holbert:
> On 04/05/2010 09:58 AM, Dr. Olaf Hoffmann wrote:
>  > by-animations are defined (SMIL) to be equivalent to the related
>  > values-animations.
>  > No matter, about what it is and whether additive is noted or not, this
> >means,
>
>  > by="1" is equivalent to values="0;1" additive="sum".
>
> No, that's not true. "by" is supposed to add onto the underlying value,
> not onto "0". Consider e.g.

It is true, that is, why I have written additive="sum".
This is the normative definition of a by-animation, in SMIL2/3 it is
expressed in such a way

http://www.w3.org/TR/SMIL3/smil-animation.html#AnimationNS-FromToBy

and there is no conflict with the old SMIL animation recommendation.

Just for animateTransform SVG specifies a specific rule, how to
apply the animation effect, if it is additive, this simply means, that
the effect of values="0,1" ist postmultiplied to the matrix the
corresponds to the underlying value.

> <svg xmlns="http://www.w3.org/2000/svg">
>   <rect x="100" y="100" width="50" height="50">
>     <animate attributeName="x" by="20" dur="2s"/>
>   </rect>
> </svg>
>
> Here, |by="20"| is equivalent to |values="100;120"| (NOT values="0;20")
> because the underlying value is 100, and we're adding 20 onto it.

No it is equivalent to 'values="0;20" additive="sum"' as already mentioned.
This can be a difference for example, if it is cumulative too ;o)
With values="0;20" or (from="0") by="20" too an author mainly ensures, that a 
cumulative animation does not jump.

>
> Normative definition of by-animation is here:
>   http://www.w3.org/TR/2001/REC-smil-animation-20010904/#ByAttribute
>

or for tiny 1.2 it is here:
http://www.w3.org/TR/SMIL2/

However, the old SMIL animation recommendation has some
ambiguities and some problems, one can in almost every case
avoid by looking in SMIL3 to clarify all the old known problems
in understanding, how it was intended.

Indeed, in some cases for the old SMIL animation recommendation
you have a few options to interprete some details wrong, if you like ;o)
Therefore I would recommend to look first in SMIL3, then into
the old SMIL animation recommendation to get a proper interpretation
of it (for SVG then one still has to look for a few specific rules into
the SVG recommendations, which are not sufficient to understand
animation without SMIL, of course).



Olaf

Received on Monday, 5 April 2010 17:56:08 UTC