La linea segue il puntatore del mouse
GraphicsWindow.MouseMove=MouseMosso xC=GraphicsWindow.Width/2 yC=GraphicsWindow.Height/2 Sub MouseMosso x=GraphicsWindow.MouseX y=GraphicsWindow.MouseY GraphicsWindow.Clear() GraphicsWindow.DrawLine(xC,yC, x,y) Program.Delay(25) Endsub
E disegna un mirino
w=GraphicsWindow.Width h=GraphicsWindow.Height GraphicsWindow.MouseMove=MouseMosso r1=10 d1=2*r1 r2=20 d2=2*r2 Sub MouseMosso x=GraphicsWindow.MouseX y=GraphicsWindow.MouseY GraphicsWindow.Title="x=" + x + ", y=" + y GraphicsWindow.Clear() GraphicsWindow.DrawLine(0,y, w,y) GraphicsWindow.DrawLine(x,0, x,h) GraphicsWindow.DrawEllipse(x-r1, y-r1, d1,d1) GraphicsWindow.DrawEllipse(x-r2, y-r2, d2,d2) Program.Delay(25) Endsub