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 (parent:
8a5f965
)
draw curve using pixels
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Wed, 19 May 2010 16:31:10 +0000
(18:31 +0200)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Wed, 19 May 2010 16:31:10 +0000
(18:31 +0200)
trace-path.pl
patch
|
blob
|
history
diff --git
a/trace-path.pl
b/trace-path.pl
index
ed1c237
..
02be19c
100755
(executable)
--- a/
trace-path.pl
+++ b/
trace-path.pl
@@
-54,10
+54,9
@@
sub curve {
my $i = 0;
while ( $i < $#curve ) {
my $i = 0;
while ( $i < $#curve ) {
- my $rect = SDL::Rect->new( -x => int($curve[$i++]), -y => int($curve[$i++]), -w => 1, -h => 1 );
- $app->fill( $rect, $red );
- $app->update( $rect );
+ $app->pixel( int($curve[$i++]), int($curve[$i++]), $red );
}
}
+ $app->sync;
}
sub handle_events {
}
sub handle_events {