What if we wanted to have two object rotating on the screen at different rates? Since the translate()
and rotate()
functions are cumulative, we could try to make a transformation for one object and then make another transformation relative the first, but that seems like an awful lot of math. It might just be easier to make them operate independently.
The push()
function saves the current drawing style settings and transformations, while pop()
restores these settings. Note that these functions are always used together. They allow you to change the style and transformation settings and later return to what you had. When a new state is started with push()
, it builds on the current style and transform information. The push()
and pop()
functions can be embedded to provide more control.
In Groups: Create a watch face that can accurately display time in digital and analog, i.e. with hour, minute, and second hands.
Your code must include:
In order to get the current hour, minute, and second based on your computer’s clock use the following: