GNOME Bugzilla – Bug 327931
Discontinuous motion in pygtk pixmap demo
Last modified: 2006-04-02 15:19:19 UTC
In examples/pygtk-demo/demos/pixbufs.py:PixbufsDemo.timeout(), when f = 0 (the first frame of the loop), the and-or pretend ternary idiom fails because the sine of the angle evaluates to 0.0 (false) and so the cosine is substituted. Expressions including "(i & 1)" are those affected. See http://diveintopython.org/power_of_introspection/and_or.html#d0e9975 The symptom of the bug is a discontinuous flash in the motion of the rotating images. The solution is to rewrite the calculation (and a later calculation for composite alpha) using if-else.
Created attachment 57765 [details] [review] Patch to fix discontinuous motion in examples/pygtk-demo/demos/pixbufs.py This patch fixes the discontinuous motion bug.
Thanks for the patch, I just committed it to CVS.