DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=41947>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ· INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=41947 Summary: Bug in animateTransform freeze Product: Batik Version: 2.0 Platform: Other OS/Version: other Status: NEW Severity: normal Priority: P2 Component: GVT AssignedTo: [email protected] ReportedBy: [EMAIL PROTECTED] I believe I have stumbled upon a bug in Batik (present in current development sources). It is exposed by the following SVG: <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="-100.00 -100.00 500.00 500.00"> <circle r="5.0000" id="button" fill="red" /> <g transform="translate(0,15)"> <animateTransform attributeName="transform" type="translate" from="0,15" to="0,45" dur="0.4s" fill="freeze" additive="replace" begin="button.click" /> <circle r="5.0000" fill="blue" /> </g> </svg> The idea here is that a click on the circle with ID "button" triggers the animation of the second circle (within the group). The bug is that quite often (at more or less random times), the circle's position is reset to the original position rather than remain at the end of the animation. I am unfamiliar with the Batik sources (and Java as such), but I have looked at the sources, and it appears to me that the problem is in TimedElement.java, in TimedElement.sampleAt(). Near the end there is something to do with computing/"sampling" the final value, and it seems that for some reason this is done by taking the current time (in the variable t) modulo the animation's duration (in the variable d). Presumably due to floating point inaccuracies, this modulo operations sometimes just "overflows" back to just above zero, causing the effect (position reset) described above. If I simply add a small constant, such as 0.05, to the duration 'd', the bug seems to disappear. However I don't expect that this is really the correct solution. Hopefully someone with a better grasp of Batik will be able to fix it properly. -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
