Exemplar: Analogue Clock

Hugh Senior H at flexibleLearning.com
Sun Feb 3 06:11:01 EST 2002


Okay, so it takes some of us take a while to get around to writing a clock 
face (in my case about 15 years), but this is an exemplar offering for any 
newcomers to scripting. This is also to salve my guilt-trip conscience for 
not participating very actively on this list over the past year!

It uses MetaCard's built-in angle and arcAngle features combined with ink 
effects to generate the three hands of an analogue clock face, rather than 
attempting long-winded arc coordinate geometry to calculate line points 
manually. It demonstrates that a bit of lateral thinking (in this case by 
inverting the pie slice with overlay inks) can produce an elegant result in 
a very small size (the stack is only 6k and that includes user options and 
an 'About' window). It also shows up the differences in the implementation 
of graphics between MacOS and Win32 as the stack 'swings both ways'.

http://www.flexiblelearning.com/xtalk/AnalogueClock.mc

Hope someone finds it useful.

/H

Hugh Senior
The Flexible Learning Company
Consultant Programming & Software Solutions
Fax/Voice: +44 (0)1483.27 87 27
Email: admin at flexibleLearning.com
Web: www.flexibleLearning.com
-------------- next part --------------

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.306 / Virus Database: 166 - Release Date: 04/12/2001


More information about the metacard mailing list