// This sample draw a line to show where the mouse cursor is
event.load
window.main.shape.elliptic(0,0,100,100)
window.main.canGoOut(true)
doevent.anim
event.end
event.anim
&angle = num.getAngle(
window.main.left() + 50, window.main.top() + 50,
mouse.x(), mouse.y()
) + 90
draw.main.rect(0,0,100,100,num.rgb(0,0,255))
draw.main.line( \
50,50,num.sin(&angle, 100)+50, num.cos(&angle, 100)+50,
2, num.rgb(255,0,0)
)
draw.main.paint
doevent.anim(20)
event.end |