Tedd, I put the question again to the list. Sory, for not knowing the
procedure.
Now, the problem is for everybody.
That’s right, <<CALL SETORIGIN(x,y)>> moves the coordinates somewhere on
the window, but unfortunately it doesn’t solve my problem. For instance,
I wont to draw the face of a clock, the minutes, the hours, I wont to
move the hands of the clock, etc. Using <<CALL SETORIGIN(x,y)>> I can
draw only in a quarter of the window (lets say:
‘ WINDOW 1, "My Clock",(0,0)-(200,200)
‘ CALL SETORIGIN(-100,-100),
the origin is in the middle of the window, but I can see only the
right-down quarter).
Why I must write (-100,-100) and not (100,100)?
I need a statement that can moves the origin to (100,100) and when I
want to draw the circle <<CIRCLE 0,0,70>>, in the middle of the window,
in clockwise, not in a trigonometric one, not only a quarter of it.
I write the begining of my program:
‘-----------------------------------------------------------------------------------------
LOCAL FN ClockWindow
WINDOW 1, "A clock",(0,0)-(200,200),_docRound,_clickThru
COORDINATE WINDOW
‘CALL SETORIGIN(-100,-100)
'PLOT TO 0,0
END FN
LOCAL FN DrowingTheClock
PI!=3.14159265359
FOR I%=0 TO 60
za!=PI!*I%/30
CIRCLE 70*SIN(za!), 70*COS(za!),1
NEXT I%
FOR I%=0 TO 60 STEP 5
za!=PI!*I%/30
CIRCLE 70*SIN(za!), 70*COS(za!),2
NEXT I%
END FN
LOCAL FN SecondsHand
t$=TIME$
'PRINT RIGHT$(t$,2)
sec%=VAL(RIGHT$(t$,2))
secalfaX!=PI!*sec%/30
PLOT 0,0 TO 67*COS(secalfaX!), 67*SIN(secalfaX!)
END FN
FN ClockWindow
FN DrowingTheClock
FN SecondsHand
DO
HANDLEEVENTS
UNTIL gProgramEnds
‘-----------------------------------------------------------------------------------------
If you’ll try this (everybody can try this) you will see what I mean.
Eugen