9 use SDL::Tool::Graphic;
11 my $app = new SDL::App(-title => "Graphic Tool Test",
16 my $app_rect = new SDL::Rect( -x=>0,
19 -height=>$app->height);
21 my $sprite = new SDL::Surface(-name => "data/logo.png");
22 $sprite->display_format();
25 my $graphicTool = new SDL::Tool::Graphic();
26 $graphicTool->zoom($sprite, .5, .5, 1);
28 my $sprite_rect = new SDL::Rect( -x=>0,
30 -width=>$sprite->width,
31 -height=>$sprite->height);
32 $sprite->blit($sprite_rect, $app, $sprite_rect);
35 $app->fill($app_rect, $SDL::Color::black);
39 $graphicTool->rotoZoom($sprite, 90, 1, 1);
41 $sprite_rect = new SDL::Rect( -x=>0,
43 -width=>$sprite->width,
44 -height=>$sprite->height);
45 $sprite->blit($sprite_rect, $app, $sprite_rect);
49 +print "GrayScaling\n";
50 +$app->fill($app_rect, $SDL::Color::black);
53 $graphicTool->grayScale($sprite);
55 $sprite->blit($sprite_rect, $app, $sprite_rect);