Un pallino colorato a ogni clic del mouse
GraphicsWindow.BackgroundColor="Black" GraphicsWindow.MouseDown=PALLINO r=5 d=2*r Sub PALLINO x=GraphicsWindow.MouseX y=GraphicsWindow.MouseY c=GraphicsWindow.GetRandomColor() GraphicsWindow.BrushColor=c GraphicsWindow.FillEllipse(x-r, y-r, d, d) Endsub
Una linea e un pallino a ogni clic del mouse
GraphicsWindow.BackgroundColor="Black" GraphicsWindow.MouseDown=PALLINO w2=GraphicsWindow.Width/2 h2=GraphicsWindow.Height/2 r =5 d =2*r Sub PALLINO x=GraphicsWindow.MouseX y=GraphicsWindow.MouseY c=GraphicsWindow.GetRandomColor() GraphicsWindow.PenColor =c GraphicsWindow.BrushColor=c GraphicsWindow.DrawLine(w2, h2, x, y) GraphicsWindow.FillEllipse(x-r, y-r, d, d) Endsub