You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-dev@xmlgraphics.apache.org by bu...@apache.org on 2007/03/26 15:41:47 UTC
DO NOT REPLY [Bug 41947] New: - Bug in animateTransform freeze
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: batik-dev@xmlgraphics.apache.org
ReportedBy: frodef@stud.cs.uit.no
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: batik-dev-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-dev-help@xmlgraphics.apache.org
DO NOT REPLY [Bug 41947] - Bug in animateTransform freeze
Posted by bu...@apache.org.
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
cam@apache.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
------- Additional Comments From cam@apache.org 2007-09-25 18:07 -------
This is now fixed in SVN.
--
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: batik-dev-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-dev-help@xmlgraphics.apache.org
DO NOT REPLY [Bug 41947] - Bug in animateTransform freeze
Posted by bu...@apache.org.
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
cam@apache.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
------- Additional Comments From cam@apache.org 2007-03-26 23:15 -------
Hi Frode.
Thanks for the useful test case. It does indeed seem to be some numerical
accuracy issue.
--
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: batik-dev-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-dev-help@xmlgraphics.apache.org