Xenther has asked for the wisdom of the Perl Monks concerning the following question:
What am I missing? Thanks!!#!/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 ); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: "Ken Burns" effect using SDL
by zentara (Cardinal) on Jun 10, 2012 at 13:27 UTC |