[gthumb: 9/10] [slideshow] added a fade effect to the slide transition



commit ea9d9df634996d09b74b800d04a61afa6026f22a
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Mon Apr 5 15:48:27 2010 +0200

    [slideshow] added a fade effect to the slide transition

 extensions/slideshow/main.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/extensions/slideshow/main.c b/extensions/slideshow/main.c
index 15a9328..71e9903 100644
--- a/extensions/slideshow/main.c
+++ b/extensions/slideshow/main.c
@@ -93,6 +93,10 @@ slide_from_right_transition (GthSlideshow *self,
 	clutter_actor_get_size (self->stage, &stage_w, &stage_h);
 	clutter_actor_set_x (self->next_image, (float) VALUE_AT_MSECS (stage_w, GTH_TRANSITION_DURATION - msecs) + self->next_geometry.x);
 
+	if (self->current_image != NULL)
+		clutter_actor_set_opacity (self->current_image, (int) VALUE_AT_MSECS (255.0, GTH_TRANSITION_DURATION - msecs));
+	clutter_actor_set_opacity (self->next_image, (int) VALUE_AT_MSECS (255.0, msecs));
+
 	if (self->first_frame) {
 		if (self->current_image != NULL) {
 			clutter_actor_show (self->current_image);
@@ -112,6 +116,10 @@ slide_from_bottom_transition (GthSlideshow *self,
 	clutter_actor_get_size (self->stage, &stage_w, &stage_h);
 	clutter_actor_set_y (self->next_image, (float) VALUE_AT_MSECS (stage_h, GTH_TRANSITION_DURATION - msecs) + self->next_geometry.y);
 
+	if (self->current_image != NULL)
+		clutter_actor_set_opacity (self->current_image, (int) VALUE_AT_MSECS (255.0, GTH_TRANSITION_DURATION - msecs));
+	clutter_actor_set_opacity (self->next_image, (int) VALUE_AT_MSECS (255.0, msecs));
+
 	if (self->first_frame) {
 		if (self->current_image != NULL) {
 			clutter_actor_show (self->current_image);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]