scan

(#<widget> 'scan option args)
This command is used to implement scanning on canvases. It has two forms, depending on option:
(#<widget> 'scan 'mark x y)
Records x and y and the canvas's current view; used in conjunction with later scan dragto commands. Typically this command is associated with a mouse button press in the widget and x and y are the coordinates of the mouse. It returns an empty string.
(#<widget> 'scan 'dragto x y ?gain?)
This command computes the difference between its x and y arguments (which are typically mouse coordinates) and the x and y arguments to the last scan mark command for the widget. It then adjusts the view by gain times the difference in coordinates, where gain defaults to 10. This command is typically associated with mouse motion events in the widget, to produce the effect of dragging the canvas at high speed through its window. The return value is an empty string.

© Author | Home | Sitemap