#!/usr/bin/perl use SDL; use SDL::Event; use SDL::App; use SDL::Rect; use SDL::Surface; use warnings; use strict; my $app = new SDL::App ( -title => 'Ken Burns Slideshow', -width => 640, -height => 480, -depth => 32, ); my $frame = SDL::Surface->new( -name => '/path/to/testimage.jpg' ); my $frame_rect = SDL::Rect->new( -height => $frame->height(), -width => $frame->width(), -x => 0, -y => 0, ); my $dest_rect = SDL::Rect->new( -height => $frame->height(), -width => $frame->width(), -x => 0, -y => 0, ); $frame->blit( $frame_rect, $app, $dest_rect ); $app->update( $dest_rect ); for my $x ( 1 .. 200 ) { $dest_rect->x( $x ); $dest_rect->y( $x ); $frame->blit( $frame_rect, $app, $dest_rect ); $app->update( $dest_rect ); $app->sync; $app->delay( 10 ); }