W3C home > Mailing lists > Public > www-svg@w3.org > June 2010

Re: animate-elem-46-t.svg

From: Dr. Olaf Hoffmann <Dr.O.Hoffmann@gmx.de>
Date: Wed, 9 Jun 2010 14:57:26 +0200
To: www-svg@w3.org
Message-Id: <201006091457.26503.Dr.O.Hoffmann@gmx.de>
Boris Zbarsky:
> Now the question I don't know the answer to is what SMIL actually does.

It defines how to animate features:
"A target attribute is the name of a feature of a target element as defined in 
a host language document."

>   In particular, does it operate on value objects, or on strings?

I think, the host language has to explain, what the value is.
SMIL only explains how to get an animation effect function.
This function has to be interpreted to produce a presentation
at each time, the viewer needs to present the document.
The host language has to define, what attributes, properties and
different units of values mean and how such units are related.
Because at least for continuous animation effects SMIL describes only
how to interpolate between numbers or lists of numbers of the same length
or numbers, if all of them have the same unit.
If the values are not all interpolable, they are treated as strings with only
discrete calcMode.
If such a values is more complex like a colour value or that of an
svg:tranform, or lists of different lengths, the host language has to define 
the interpretation of those constructs, as SMIL and SVG do for colours,
SVG for transform and for some complex list constructs like stroke-dasharray
(the animation value lists can have different length, but because SVG defines 
how to interprete these lists as pattern, it is possible to construct a 
representation, that is interpolable).
Following these definitions, it is possible finally to apply SMIL animation
to numbers or lists of numbers and to put back the result of the
interpolation into the more complex construct to be presented.

>   If 
> the former, then which rules are supposed to be used to convert those
> strings to value objects and in what cases?

If not trivial, this has to be defined in the host language.
I think, we can assume that it is almost trivial to interpolate
values="1mm;1cm" as long as the host language defines 
a relation between the units mm and cm.
It can be assumed that it is trivial to interpolate values="1,2,3;4,5,6" as
well. These are lists with the same length, no need to get excited, because
interpolation can be applied to each list item.
Exception is calcMode paced, this requires some more information about
what the meaning of the animated attribute is to define a distance function
that ensures, that a paced effect appears and not something arbitrary. 
If not suggested in SMIL as for colours, this has to be done or derived 
from the definition of the attribute in the host language.
Typically there is no paced effect for arbitrary lists, this requires scalars
or vectors...

> And as a specific example to guide discussion, if you use SMIL to
> animate line-height, what should happen?

This is a CSS property.
The CSS recommendation (or another using this property as well)
has to define whether this is animatable or not.
In doubt this host language has to define as well, how different
possible units and notations are related to each other and to
some representation as interpolable numbers in case, that 
continuous animations are allowed. Typically this happens already,
because a user-agent has to present this finally in device pixels somehow.
Then one has to explore, if there is some meaningful behaviour
related to paced animation. Because the value is something like
a scalar, there should be no need to define the distance function

Received on Wednesday, 9 June 2010 13:01:43 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:54:26 UTC