projects
/
perl-landing-airplanes.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
1428dfa
)
we one point to access mask
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Wed, 19 May 2010 22:20:33 +0000
(
00:20
+0200)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Wed, 19 May 2010 22:20:33 +0000
(
00:20
+0200)
trace-path.pl
patch
|
blob
|
history
diff --git
a/trace-path.pl
b/trace-path.pl
index
6239d13
..
3611481
100755
(executable)
--- a/
trace-path.pl
+++ b/
trace-path.pl
@@
-83,6
+83,12
@@
sub reset_path { @path = () }
sub curve {
+ if ( $#path < 1 ) {
+ warn "path too short ", dump @path;
+ reset_path;
+ return;
+ }
+
my $mask_col = $mask->pixel( $path[-2], $path[-1] );
my $mask_hex = sprintf '%02x%02x%02x', $mask_col->r, $mask_col->g, $mask_col->b;
warn "mask $path[-2] $path[1] $mask_hex\n";