Question about the ED version of animateColor

View: New views
2 Messages — Rating Filter:   Alert me  

Question about the ED version of animateColor

by Julien Reichel :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Hi,

The new version of animateColor in [1], specify that:
"In the case of 'currentColor' and 'inherit', if these evaluate to a
color then all animation modes may be used. Otherwise, and in the case
where 'none' is specified, only discrete animation may be used"

However, it is possible that trough other animations the animation has
to switch from a discrete animation to another mode. This would be
equivalent to animating the calcMode, which is explicitly not allowed in
the 1.2 Tiny version at least.


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).

Is that the intended behaviour ?

This means that in this special case the calcMode of a given animation
would be modified... This is really not a trivial implementation
problem.

Additional note:

Let see the example below taken from the testset
http://dev.w3.org/SVG/profiles/1.2T/test/htmlEmbedHarness/animate-elem-2
27-t.html

<circle r="50" cx="390" cy="220" fill="yellow">
 <animateColor attributeName="fill" dur="5s" to="none" fill="freeze"/>
</circle>

According to the operator script:
"the circle at the bottom right (with a green fill) disappears at 2.5
seconds (discrete animation)"

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 >

I see some contradiction here....

Why should the value change at 2.5s in this case?


Thanks you in advance for the explanation.


Julien


[1]
http://dev.w3.org/SVG/profiles/1.2T/publish/animate.html#AnimateColorEle
ment
[2]
http://www.w3.org/TR/2005/REC-SMIL2-20050107/animation.html#animationNS-
ToAnimation
-------------------------------------------------------------

Julien Reichel, PhD
Technology Architect, SpinetiX S.A.
PSE-C, CH-1015, Lausanne, Switzerland

Tel:     +41 (0) 21 693 89 81
Mail:   julien.reichel@...
Get Information : http://www.spinetix.com

-------------------------------------------------------------

 
 


Parent Message unknown Re: Question about the ED version of animateColor

by Dr. Olaf Hoffmann :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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.


LightInTheBox - Buy quality products at wholesale price!