[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [pygame] Making a clock rotate



Hi all, I'm trying to make a clock with pygame and python2.2 but I have a
problem in rotating the pointer.
The image is the pointer, and quadrante is the clock. The code below is
just supposed to rotate of 6 degrees CW the pointer but I don't manage
to...

Hi;

I sent this to the python list also, but I seem to be having
some problems with that list right now...

You could try the pygsear package:
http://savannah.nongnu.org/projects/pygsear/

It might look something like:



import time
from pygsear.Drawable import RotatedImage

hand = RotatedImage(file='hand.png', steps=60)

keys = hand.images.keys()
keys.sort()
keys.reverse()

for key in keys:
hand.uclear()
hand.flip(key)
hand.center()
hand.udraw()
time.sleep(1)


_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963