Re: Animation and inherit

Russ,
Consider animation to be a sequence of discrete frames. (This is usually
how it will be implemented.) At each frame, there is a document with a
current set of property values, some of which have been set by running
animations. At that moment in time, each element has a known value for each
property. (In the CSS model, every element has a "specified value" for
every possible property.) For that moment in time, recompute the entire
document by reapplying the CSS cascade, and redo all inheritance. Then
render the frame.

This model may sound very heavy, and likely to run very slowly in some
cases, but the model is necessary to prevent animations for overriding
!important settings in user style sheets, which must be supported to meet
the needs for accessibility. There are various shortcuts that an
implementation can use to avoid having to run the CSS cascade, and there
are guidelines to authors that can be given to minimize/eliminate the need
to run the CSS cascade with each frame. I would expect that animating a
property on a container element would tend generate some sort of
performance hit since inheritance might have to be recomputed for each of
the descendants of that container.

Jon Ferraiolo
SVG Editor
Adobe Systems Incorporated


At 12:25 PM 7/12/00 -0500, Russ Shotts wrote:
>
>
>Section 19.2.9 of the spec states that animated attributes and properties
>can be inherited by descendent elements.  What happens when an inherited
>attribute is animated on a descendent?  What if 'inherit' is used as a
>value?
>
>
>    <g style="stroke-width:5; stroke:black; fill:none" >  
>
>        <ellipse cx="300" cy="200" rx="100" ry="20" >
>            <animate attributeName="stroke-width" to="10" dur="10s"
>repeatCount="100"/>
>        </ellipse>
>
>        <ellipse cx="300" cy="400" rx="100" ry="20" >
>            <animate attributeName="stroke-width" values="10; inherit; 20"
>dur="10s" repeatCount="100"/>
>        </ellipse>
>
>    </g>
>
>
>
>What if the attribute is also animated on the parent group?
>
>    <g style="stroke-width:5; stroke:black; fill:none" >  
>        <animate attributeName="stroke-width" values="5; 20; 5;" begin="5s"
>dur="10s" repeatCount="100" additive="sum"/>
>
>        <ellipse cx="300" cy="200" rx="100" ry="20" >
>            <animate attributeName="stroke-width" to="10" dur="10s"
>repeatCount="100"/>
>        </ellipse>
>
>        <ellipse cx="300" cy="400" rx="100" ry="20" >
>            <animate attributeName="stroke-width" values="10; inherit; 20"
>dur="10s" repeatCount="100"/>
>        </ellipse>
>
>    </g>
>
>
>Thanks.
>
>Russ Shotts
>Senior Software Engineer
>Jasc Software, Inc
> 

Received on Thursday, 13 July 2000 12:52:05 UTC