Re: ISSUE-2306 (smil-integer): SMIL calcMode="linear" and animation of integers is underspecified [SVG Core 2.0]

On Thu, 18 Feb 2010 23:27:40 +0100, SVG Working Group Issue Tracker  
<sysbot+tracker@w3.org> wrote:

>
> ISSUE-2306 (smil-integer): SMIL calcMode="linear" and animation of  
> integers is underspecified [SVG Core 2.0]
>
> http://www.w3.org/Graphics/SVG/WG/track/issues/2306
>
> Raised by: Jonathan Watt
> On product: SVG Core 2.0
>
> Here's the comment that I added to one of Mozilla's tests:
>
>   <!-- Our implementation strategy for animating integers with
>        calcMode="linear" is to use round(), with the slight twist that we
>        round "to the NEXT value" when the current time puts us exactly  
> midway
>        between two integer values. (This is so that the result of  
> midpoint
>        rounding does not depend on whether we're animating up to a higher
>        value or animating down to a lower value.) Note that one of the  
> quirks
>        of using round() is that the start and end values of any integer
>        range only receive half as much time as any intermediary values.  
> This
>        is as you would expect mathematically, but it's probably  
> unexpected
>        for most users!
...

I think that the attribute values that are defined to be integers should  
really have been SVGNumbers, with the rounding defined not at the  
attribute value level but at the level they're applied/rendered  
(essentially let them be handled as SVGNumbers in interpolation, but  
rounded off when used by the filter code). Note that this is still  
something that the filter code needs to handle since the attributes are  
defined to use <number-optional-number> in some of the cases.

> Maybe if you could use SMIL for
> 'font-size' or something even more likely to be animated it would be.

'font-size' is defined as being animatable in SVG, but it can have  
fractions according to CSS2, so it's not exactly the same thing.

Cheers
/Erik

-- 
Erik Dahlstrom, Core Technology Developer, Opera Software
Co-Chair, W3C SVG Working Group
Personal blog: http://my.opera.com/macdev_ed

Received on Monday, 22 February 2010 09:21:00 UTC