Gesture::Simple - the $1 (mouse) gesture recognizer
my $recognizer = Gesture::Simple->new; my @points = read_mouse_coordinates(); my $gesture = Gesture::Simple::Gesture->new( points => \@points, ); my $match = $recognizer->match($gesture); if ($match) { print $match->template->name; } else { $recognizer->add_template( Gesture::Simple::Template->new( points => \@points, name => readline(), ), ); }
Shawn M Moore, sartak@gmail.com
sartak@gmail.com
This module is alpha quality. Use it at your own risk.
http://faculty.washington.edu/wobbrock/pubs/uist-07.1.pdf - Paper describing the algorithm
http://depts.washington.edu/aimgroup/proj/dollar/ - Javascript example of the algorithm
Copyright 2009 Shawn M Moore.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Gesture::Simple, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Gesture::Simple
CPAN shell
perl -MCPAN -e shell install Gesture::Simple
For more information on module installation, please visit the detailed CPAN module installation guide.