open slides overview with SDL
authorDobrica Pavlinusic <dpavlin@rot13.org>
Mon, 19 Oct 2009 18:01:06 +0000 (20:01 +0200)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Mon, 19 Oct 2009 18:01:06 +0000 (20:01 +0200)
lib/HTML5TV/Slides.pm [new file with mode: 0644]

diff --git a/lib/HTML5TV/Slides.pm b/lib/HTML5TV/Slides.pm
new file mode 100644 (file)
index 0000000..000f132
--- /dev/null
@@ -0,0 +1,38 @@
+use warnings;
+use strict;
+
+package HTML5TV::Slides;
+
+use SDL::App;
+use SDL::Surface;
+use SDL::Rect;
+
+sub new {
+       my $class = shift;
+       my $self = {
+               border_color => SDL::Color->new( -r => 0xFF, -g => 0xCC, -b => 0x00 ),
+       };
+       bless $self, $class;
+}
+
+my $overview = SDL::Surface->new( -name => 'media/_editing/s/overview.jpg' );
+
+my $app = SDL::App->new(
+       -width  => $overview->width(),
+       -height => $overview->height(),
+       -depth  => 24,
+       -title  => 'Slides',
+);
+
+my $rect = SDL::Rect->new(
+       -height => $overview->height(),
+       -width  => $overview->width(),
+       -x      => 0,
+       -y      => 0,
+);
+
+$overview->blit( $rect, $app, $rect );
+$app->update( $rect );
+
+<STDIN>;
+