From d08a4fc30124d3012d9c0b96a77e10884dff01f1 Mon Sep 17 00:00:00 2001 From: Dobrica Pavlinusic Date: Wed, 19 May 2010 18:31:10 +0200 Subject: [PATCH] draw curve using pixels --- trace-path.pl | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/trace-path.pl b/trace-path.pl index ed1c237..02be19c 100755 --- a/trace-path.pl +++ b/trace-path.pl @@ -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 { -- 2.20.1