]> www.fi.muni.cz Git - evince.git/commitdiff
Implement "fade" effect.
authorCarlos Garnacho <carlosg@gnome.org>
Fri, 4 Jan 2008 20:27:41 +0000 (20:27 +0000)
committerCarlos Garnacho <carlosg@src.gnome.org>
Fri, 4 Jan 2008 20:27:41 +0000 (20:27 +0000)
2008-01-04  Carlos Garnacho  <carlosg@gnome.org>

        * shell/ev-transition-animation.c (ev_transition_animation_fade)
        (ev_transition_animation_paint): Implement "fade" effect.

svn path=/trunk/; revision=2809

ChangeLog
shell/ev-transition-animation.c

index f176ed1836358b81841e6d9effc9cc7625447fed..f0939039c120714cc138fff513ffabadee7dd095 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-01-04  Carlos Garnacho  <carlosg@gnome.org>
+
+       * shell/ev-transition-animation.c (ev_transition_animation_fade)
+       (ev_transition_animation_paint): Implement "fade" effect.
+
 2008-01-04  Carlos Garnacho  <carlosg@gnome.org>
 
        * shell/ev-transition-animation.c (ev_transition_animation_uncover)
index 676552c9be734cfe59840d1d4885b4e3daf90bf8..5bea280c9bcc52d1f346dda20f6f6b91ddf40164 100644 (file)
@@ -529,6 +529,21 @@ ev_transition_animation_uncover (cairo_t               *cr,
        }
 }
 
+static void
+ev_transition_animation_fade (cairo_t               *cr,
+                             EvTransitionAnimation *animation,
+                             EvTransitionEffect    *effect,
+                             gdouble                progress,
+                             GdkRectangle           page_area)
+{
+       EvTransitionAnimationPriv *priv;
+
+       priv = EV_TRANSITION_ANIMATION_GET_PRIVATE (animation);
+
+       paint_surface (cr, priv->origin_surface, 0, 0, 0, page_area);
+       paint_surface (cr, priv->dest_surface, 0, 0, progress, page_area);
+}
+
 void
 ev_transition_animation_paint (EvTransitionAnimation *animation,
                               cairo_t               *cr,
@@ -579,6 +594,9 @@ ev_transition_animation_paint (EvTransitionAnimation *animation,
        case EV_TRANSITION_EFFECT_UNCOVER:
                ev_transition_animation_uncover (cr, animation, priv->effect, progress, page_area);
                break;
+       case EV_TRANSITION_EFFECT_FADE:
+               ev_transition_animation_fade (cr, animation, priv->effect, progress, page_area);
+               break;
        default: {
                GEnumValue *enum_value;