beetlebug▾
/

canvas scan

Scrolls the canvas by a drag of the mouse.

PATHNAME scan mark X Y
PATHNAME scan dragto X Y ?GAIN?

Description

scan mark keeps the point X,Y and the current view. scan dragto then scrolls the view by GAIN times the distance from that mark to X,Y. The default GAIN is 10.

Returns

An empty string.

Examples

% canvas .sn
> .sn scan mark 0 0
> .sn scan dragto 10 10 1

Errors

% canvas .sn2; .sn2 scan bogus 1 1
bad scan option "bogus": must be mark or dragto
-errorcode NONE

Facts

Capability
None.
Tcl release
Tcl 9.1 and 8.6.
Since
ztk 1.0.0-beta.1

See also