Center photos on the screen.
authorAndrew Ruthven <andrew@etc.gen.nz>
Fri, 26 Sep 2008 10:24:52 +0000 (22:24 +1200)
committerAndrew Ruthven <andrew@etc.gen.nz>
Fri, 26 Sep 2008 10:24:52 +0000 (22:24 +1200)
lib/Display/Plugins/FSpot.pm

index 6bcff21..8664785 100644 (file)
@@ -40,6 +40,14 @@ sub display_photo {
   $self->{'new'}->set_from_file($file);
   $self->{'new'}->set_opacity(0);
   $self->{'new'}->set_height($self->{'stage'}->get_height());
+  $self->{'new'}->set_anchor_point(
+    $self->{'new'}->get_width / 2,
+    $self->{'new'}->get_height / 2
+  );
+  $self->{'new'}->set_position(
+    $self->{'stage'}->get_width / 2,
+    $self->{'stage'}->get_height / 2
+  );
   #$self->{'stage'}->add($self->{'new'});
 
 #warn "Going to show $file\n";