Here’s a version of Mike’s alpha demo, in a python implementation that’s more pythoney (rather than a direct translation from C). GTK+/pygtk folks, any chance we could get that compositing-manager detection code out into the world before 2.10?
#1 by gicmo on June 6th, 2006
Quote
gdk_screen_is_composited () in http://developer.gnome.org/doc/API/2.4/gdk/GdkScreen.html
#2 by David Trowbridge on June 6th, 2006
Quote
Yeah, that’s the new API in gtk+ 2.9. It’s not in the stable version, and it’s not bound by pygtk.
#3 by Marius Gedminas on June 6th, 2006
Quote
Oops. Your comment system does not have a Preview button. :-/ Please ignore my previous attempt.
This line:
radius = (float(width)/2 — 0.8, float(height)/2 — 0.8)[width < height]
would read better as
radius = min(float(width)/2 — 0.8, float(height)/2 — 0.8)
I’d also be inclined to import math and use 2 * math.pi instead of 2.0*3.14.
#4 by David Trowbridge on June 6th, 2006
Quote
Thanks for your comments — I’ve updated the example.
#5 by Marius Gedminas on June 19th, 2006
Quote
Hi again
I’d like to simplify my suggestion further:
radius = min(width, height) * 0.5 — 0.8