I made a short program to draw a hexagon.

I did a sync(), to show it. Worked fine.

I then did a drawtext command and did another sync() to show that.

The 2nd sync() eraised the hexagon.

Is that normal?

` `

win = openwindow ("Hexagon",-1,-1,640,480)

setactivewindow (win)

textsize(2)

backcolor (0,0,0,255)

cls()

Pi2=6.28318

Ang1 = Pi2/6 ; Ang = 0 ; x = 400.0 ; y = 400.0

color (255,0,0,255)

function RotateLeft()

Ang = Ang + Ang1

if Ang > Pi2 then

Ang = Ang - Pi2

end

end

function MoveSteps ( distance )

dx = cos(Ang) * distance

dy = sin(Ang) * distance

x2 = x + dx

y2 = y - dy

line( x,y,x2,y2)

x = x2 ; y = y2

end

color (0,0,255,255)

cnt = 0

while cnt < 6

do -- the pair of keywords " do " and " end " are like brackets in c-language

MoveSteps ( 100 )

RotateLeft()

cnt = cnt + 1

end

--sync()

drawtext("Press any key to exit ..",0,0)

sync()

key=inkey()

closewindow(win) -- This ends the program.

closeapplication()