Re: Question about the ED version of animateColor

The problem with none interpolable values within an animation
once was discussed, but fortunately up to now nothing is changed
in SVGT 1.2.
In the definition of calcMode we find in all SVG versions and in SMIL
something like this:
"The default mode is linear, however if the attribute does not support 
linear interpolation (e.g. for strings), the 'calcMode' attribute is ignored
and discrete interpolation is used."
Obviously, if the values list contains none interpolable values, the
attribute cannot support linear interpolation for such a list.
This simply means, that if the values list contains a none interpolable
value, calcMode="discrete" is used for the complete animation.
It is not possible for authors to animate or to switch calcMode, therefore
it would be pretty useless, if user agents would do it anyway - and
this would cause more questions and inconsistencies with timing and
compatibility problem with SMIL and previous SVG versions.

However, there may be other opinions about this and there are other
for authors almost unpredictable implementations currently, therefore 
authors should always explictely set calcMode="discrete" for such 
a situation to avoid nonsense and inconsistencies between different 
viewers. 



>However according to SMILE [2]:
><Since a to animation has only 1 value, a discrete to animation will
>simply set the to value for the simple duration >

Yes, this is new in SMIL2, there was no such specific rule in the old
SMIL animation recommendation, therefore the assumption of the
test is still derived from SVG1.1 and the old SMIL animation 
recommendation and fitting to an implicte calcMode="discrete"
Why this new rule was introduced in SMIL is more a question to
the SYMM group, however because SVGT 1.2 depends on SMIL2,
this needs to be changed (and user agents have to look on the
SVG version used for the document to get this right both for 
SVG1.1 and SVGT 1.2 respectively for the old SMIL recommendation 
and SMIL2/3).



>Example:
><circle r="50" cx="390" cy="100" fill="none">
> <set attributeName="fill" begin="2.5s" to="red"/>
> <animateColor attributeName="fill" dur="5s" to="green" fill="freeze"/>
></circle>

>From 0 to 2.5 the animateColor calcMode is discrete, but from 2.5 to 5s
>it is linear (the default value).

This is much simpler as described.
From 0 to 2.5s the animateColor is relevant, because it cannot be linear it
is discrete.
The set animation begins at 2.5s; because set animations are not additive,
the color is simply set to red at 2.5s and animateColor will be covered by
this effect, independent from the used calcMode or with any problems with
none interpolable values, this is just because the later begin results in
higher priority.

Received on Thursday, 7 August 2008 08:58:24 UTC