After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 327931 - Discontinuous motion in pygtk pixmap demo
Discontinuous motion in pygtk pixmap demo
Status: RESOLVED FIXED
Product: pygtk
Classification: Bindings
Component: gtk
unspecified
Other Linux
: Normal trivial
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
Depends on:
Blocks:
 
 
Reported: 2006-01-21 00:53 UTC by Ben Caradoc-Davies
Modified: 2006-04-02 15:19 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to fix discontinuous motion in examples/pygtk-demo/demos/pixbufs.py (1.50 KB, patch)
2006-01-21 01:07 UTC, Ben Caradoc-Davies
none Details | Review

Description Ben Caradoc-Davies 2006-01-21 00:53:13 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.
Comment 1 Ben Caradoc-Davies 2006-01-21 01:07:06 UTC
Created attachment 57765 [details] [review]
Patch to fix discontinuous motion in examples/pygtk-demo/demos/pixbufs.py

This patch fixes the discontinuous motion bug.
Comment 2 Johan (not receiving bugmail) Dahlin 2006-04-02 15:19:19 UTC
Thanks for the patch, I just committed it to CVS.