draw curve using pixels
[perl-landing-airplanes.git] / trace-path.pl
index ed1c237..02be19c 100755 (executable)
@@ -54,10 +54,9 @@ sub 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 {