I made a fix to clock.c -- just smooths out the hands a bit and makes
it more like a real clock. Works on my machine anyway ;).

Fascinating code. I'm learning a lot and having a great time. Thanks
for the work on this stuff. I hope to contribute meatier patches in
the future.

[EMAIL PROTECTED]:~/Source/OpenSource/clutter-svn/clutter-cairo/examples$
diff -Naur clock.orig clock.c
--- clock.orig  2008-03-13 14:43:07.000000000 -0700
+++ clock.c     2008-03-13 14:48:50.000000000 -0700
@@ -19,8 +19,8 @@
   timeinfo = localtime (&rawtime);

   /* compute the angles for the indicators of our clock */
-  minutes = timeinfo->tm_min * M_PI / 30;
-  hours = timeinfo->tm_hour * M_PI / 6;
+  minutes = ((timeinfo->tm_min * 60) + timeinfo->tm_sec) * M_PI / 1800;
+  hours = ((timeinfo->tm_hour * 3600) + (timeinfo->tm_min * 60) +
timeinfo->tm_sec) * M_PI / (3600 * 6);
   seconds = timeinfo->tm_sec * M_PI / 30;

   /* Clear our surface */


Blake
-- 
Blake Ramsdell | http://www.blakeramsdell.com
-- 
To unsubscribe send a mail to [EMAIL PROTECTED]

Reply via email to