- From: Dr. Olaf Hoffmann <Dr.O.Hoffmann@gmx.de>
- Date: Wed, 9 Jun 2010 12:56:32 +0200
- To: www-svg@w3.org, ken@svgmaker.com
Ken Stacey: >Inheriting animation values when to="inherit" has further considerations >when fill="freeze" is present. > >When the animation ends via a simple duration is the frozen value >"inherit", or should it be the final computed value? If it is "inherit" >then this would imply that the animated value can continue to change >based on the parent's (animated) value even though the animation has >"ended". > >If the animation is ended earlier by (for example) end="click", the >frozen value is somewhere between from and inherit - "defined by the >shortened simple duration". Is the frozen value the computed value at >click or is it the animation function at click (ie continues to change >with the inherited value)? > ><g fill="#FF0000"> > <rect fill="#CCCCCC"> > <animateColor attributeName="fill" from="#808080" to="inherit" > begin="0s" dur="5s" end="click" fill="freeze"/> > </rect> > <animateColor attributeName="fill" from="#00FF00" to="#0000FF" > begin="2s" dur="5s"/> ></g> Because width and height are missing on the rect, within SVG 1.1 the rendering is finished due to this bug. In SVG tiny 1.2 the rect is not rendered, therefore there is no visible effect from the animations ;o) If we assume width and height larger than 0 and a click at 2.5s, the SMIL result for the frozen value is #404040 + 0.5 * inherit. Because according to SVG/CSS inherit can be a time dependent color value, this result is time dependent as well. Another nice case: <g fill="yellow"> <set attributeName="fill" to="black" begin="6s" /> <circle r="1"> <animate attributeName="fill" values="blue;red" dur="10s" /> <animate attributeName="fill" to="inherit" dur="10s" end="5s" fill="freeze" /> </circle> </g> At 5s we will get a frozen value of rgb(75%,50%,25%) and this remains up to 6s due to a specific rule for to-animations (different from values animations and their equivalent alternative forms). At 6s it switches to rgb(25%,0%,25%), because the inherited value changes, the value of the to attribute. No change at 10s due to the specific rule for frozen to-animations. Beyond the active duration a frozen animation is not completely finished - well, until it is restarted for example. I think, that values like 'inherit' are time dependent is not excluded by SMIL. As long as it is defined, what it means at the current time, there is no problem to determine, what the presentational effect is. Olaf
Received on Wednesday, 9 June 2010 10:59:01 UTC