Sub DEMO
sANGLE=360*Clock.Second/w_mAX
Move_second()
mANGLE=360*(Clock.minute+Clock.Second/w_max)/w_mAX
Move_minute()
hANGLE=5*360*(Clock.Hour+Clock.minute/w_max+Clock.Second/w_max/w_max)/w_mAX
Move_Hour()
GraphicsWindow.Title=(clock.Date+" "+Clock.Time)
If clock.second=0 Then
photo()
endif
ENDSUB
Sub Move_second
dsx=(DR/4-DR/2*0.1)*math.Cos(Math.GetRadians(sangle-90)) ' 44/2 ..... center of arrow length
dsy=(DR/4-DR/2*0.1)*math.sin(Math.GetRadians(sangle-90))
Shapes.Move(blc[4],x+DR/2+dsx-wr,y+dsy+0.1*DR/2+DR/4-wr)
Shapes.Rotate(blc[4],sangle)
EndSub
Sub Move_minute
dmx=0.75/0.8*(DR/4-DR/2*0.125)*math.Cos(Math.GetRadians(mangle-90)) ' 44/2 ..... center of arrow length
dmy=0.75/0.8*(DR/4-DR/2*0.125)*math.sin(Math.GetRadians(mangle-90))
Shapes.Move(blc[3],x+DR/2+dmx-wr,y+dmy+0.125*DR/2+DR/4-wr)
Shapes.Rotate(blc[3],mangle)
EndSub
Sub Move_hour
dhx=0.7/0.8*(DR/4-DR/2*0.15)*math.Cos(Math.GetRadians(hangle-90)) ' 44/2 ..... center of arrow length
dhy=0.7/0.8*(DR/4-DR/2*0.15)*math.sin(Math.GetRadians(hangle-90))
Shapes.Move(blc[2],x+DR/2+dhx-wr,y+dhy+0.15*DR/2+DR/4-wr)
Shapes.Rotate(blc[2],hangle)
EndSub
Sub scaling
GraphicsWindow.BrushColor="Yellow"
GraphicsWindow.FontSize=12
For j=1 To 60
angle=360/60*j
scx=DR/2*math.Cos(math.GetRadians(angle-90))
scY=DR/2*math.sin(math.GetRadians(angle-90))
scm[j]=Shapes.AddRectangle(2,5) ' narrow mark
If Math.Remainder(j,5)=0 Then ' 5 pitch
Shapes.Remove(scm[j])
scm[j]=Shapes.AddRectangle(5,5) ' wide mark
sct[j]=Shapes.AddText(math.Floor(j/5))
Shapes.Move(sct[j],X+DR/2+0.85*scx-6,Y+DR/2+0.85*scy-7)
EndIf
Shapes.Move(scm[j],X+DR/2+scx-1,Y+DR/2+scy-1)
Shapes.Rotate(scm[j],angle)
EndFor
EndSub