- From: Nicolas Pierre <nicolas.pierre@streamezzo.com>
- Date: Mon, 28 Aug 2006 17:40:11 +0200
- To: <www-svg@w3.org>
Hello SVG Working Group, During our implementation we had some questions about getPresentationTrait. I think that some clarifications should to be added to avoid interoperatibility issues. 1. Should a presentation value be computed more than once within the same frame ? Is it a compliant viewer if it performs only one computation per frame ? Consider the following scene part : <g id="myg" fill="red"> <rect id="myrect" fill="inherit" ...> <animateColor from="inherit" to="black" attributeName="fill" ..../> </rect> </g> And this script : r = document.getElementById("myrect"); g = document.getElementById("myg"); v1 = myrect.getPresentationTrait("fill"); g.setAttributeNS(null, "fill", "blue"); v2 = myrect.getPresentationTrait("fill"); v1 is a color between red and black according to the animateColor state. To compute v1 inheritance and animation interpolation need to be performed. If the expected value for v2 is a color between blue and black the presentation value must be recomputed. Is it the conformant behavior ? 2. Presentation value for an element within a defs. Consider this content : <svg ...> <defs> <g> <rect id="r1" fill="inherit"> <animateColor from="inherit" to="black" attributeName="fill" ..../> </rect> </g> </defs> <rect id="r2" ...> <handler type="application/ecmascript" ev:event="click"> r = document.getElementById("r1"); v = r1.getPresentationTrait("fill"); </handler> </svg> What is the expected value returned by the getPresentationTrait since r1 is never rendered? Similarly, are presentation values available even if the element is excluded from the rendering tree (display='none') ? 3. Presentation value availability when load event is fired. Consider this content : <svg ...> <rect id="myrect" fill="red"> <handler type="application/ecmascript" ev:event="load"> r = document.getElementById("myrect"); v = r1.getPresentationTrait("fill"); </handler> <set to="black" attributeName="fill" begin="0"/> </rect> </svg> I think the retrieved presentation value depends on the value of svg.timelineBegin attribute. Is it correct ? If svg.timelineBegin = onLoad what is the presentation value since the document timeline is not initialized ? Thanks in advance.
Received on Tuesday, 29 August 2006 13:40:31 UTC