home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  


Book HomeMastering Perl/TkSearch this book

9.20. Scanning

Use the scan method to implement scanning of the Canvas:

$canvas->scanMark(x, y);
$canvas->scanDragto(x, y);

The first call, $canvas->scanMark(x, y), records the x and y coordinates and the current Canvas view. The second call, $canvas->scanDragto(x, y), causes the view in the Canvas to be adjusted by 10 times the difference between these coordinates and the previous ones sent with scanMark. This makes the Canvas look as if it were moved at high speed.



Library Navigation Links

Copyright © 2002 O'Reilly & Associates. All rights reserved.