Code: Select all
Macro DrawClock(x, y, hand, hand2, hand3, enableThing)
Line(...)
Line(...)
If enableThing
Line(...)
Line(...)
More stuff...
EndIf
EndMacro
I have a design question also. I'm writing a program that draws a clock on the desktop (fully animated analog) and as such, it needs to consume as little CPU as possible. I want to make sure it does not send the CPU into a high power state, so far it's good. There will be several different options for clocks. The most comprehensive way to make it would be to have an array of structures, one for each clock, and then pass that specific array element to a DrawClock Procedure. This seems nice code-wise, but for efficiency, I thought using a Macro for drawing the clock inside of a switch case for each different clock might be more efficient. What do you think?