Re: Single-valued keyTimes

On Fri, 17 Sep 2010 04:15:29 +0200, Brian Birtles <birtles@gmail.com>  
wrote:

> Dear all,
>
> I'd like to clarify whether the following fragment of SVG is correct:
>
>     <animate attributeName="cx" values="150" keyTimes="0" dur="1s"/>
>
> The reason I believe this clarification is needed is that we have the
> following rules:
> * values is a list of ONE or more values.[1]
> * the number of keyTimes must match the number of values.[2]
> * for linear and spline animation the first keyTime must be 0 and the  
> last
> keyTime must be 1.[2]
> (Recall that for animate the default calcMode is linear)

Though if there's only one value in 'values' you could argue that it  
should be treated as a discrete animation, i.e that the last bulletpoint  
doesn't apply.

...
> Admittedly, it's a fairly obscure case since, (a) only having one value
> means it's not really linear animation anyway, (b) setting keyTimes isn't
> going to have any effect unless we have 3 or more values (except for
> calcMode=discrete).
>
> Nevertheless, SVG seems to be pretty strict about error-checking:
>
>   If there are any errors in the ‘keyTimes’  specification (bad values,  
> too
> many or too few values), the document fragment is in error (see error
> processing).[2]

Right, that's a bit unforgiving at times. Also see  
http://www.w3.org/TR/SVGTiny12/animate.html#KeyTimesAttribute.

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 Friday, 17 September 2010 09:18:12 UTC