Mouse position: Difference between revisions

Added EchoLisp
No edit summary
(Added EchoLisp)
Line 276:
end
end.</lang>
 
=={{header|EchoLisp}}==
When the '''plot''' library is loaded, the mouse position - relative to the plotting area coordinates, is displayed inside the info panel.
<lang lisp>
(lib 'plot)
(plot-x-minmax 10) ; set logical dimensions of plotting area
(plot-y-minmax 100)
→ (("x" 0 10) ("y" 0 100))
;; press ESC to see the canvas
;; the mouse position is displayed as , for example, [ x: 5.6 y : 88.7]
;; 0 <= x <= 10, 0 <= y <= 100
</lang>
 
--[[User:Neo.abhinav|Neo.abhinav]] 17:00, 6 May 2011 (UTC)