Simple code for drawing a clock
Simple code for drawing a clock
API Declarations
name first line as secLine
name second line as minLine
name third one as hourLine
set minLine.x1=secLine.x1=hourLine.x1
set minLine.Y1=secLine.y1=hourLine.y1
set the timer interval as 1000
Rate Simple code for drawing a clock
(1(1 Vote))
secLine.x2=secLine.x1+150*cos(((seconds(time)-90)*6)*3.1415/180))
secLine.y2=secline.y1+150*sin(((seconds(time)-90)*6)*3.1415/180))
minLine.x2=minLine.x1+150*cos(((minute(time)-90)*6)*3.1415/180))
minLine.y2=minLine.y1+150*sin(((minute(time)-90)*6)*3.1415/180))
hourLine.x2=hourLine.x1+150*cos(((hour(time)-90)*30)*3.1415/180))
hourLine.y2=hourLine.y1+150*sin(((hour(time)-90)*30)*3.1415/180))
Simple code for drawing a clock Comments
No comments yet — be the first to post one!
Post a Comment