From: Carlos Garnacho Date: Fri, 4 Jan 2008 20:27:41 +0000 (+0000) Subject: Implement "fade" effect. X-Git-Tag: EVINCE_2_21_90~61 X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=commitdiff_plain;h=b5004c92286718b22e8a199be06e6150de7a750d;p=evince.git Implement "fade" effect. 2008-01-04 Carlos Garnacho * shell/ev-transition-animation.c (ev_transition_animation_fade) (ev_transition_animation_paint): Implement "fade" effect. svn path=/trunk/; revision=2809 --- diff --git a/ChangeLog b/ChangeLog index f176ed18..f0939039 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-01-04 Carlos Garnacho + + * shell/ev-transition-animation.c (ev_transition_animation_fade) + (ev_transition_animation_paint): Implement "fade" effect. + 2008-01-04 Carlos Garnacho * shell/ev-transition-animation.c (ev_transition_animation_uncover) diff --git a/shell/ev-transition-animation.c b/shell/ev-transition-animation.c index 676552c9..5bea280c 100644 --- a/shell/ev-transition-animation.c +++ b/shell/ev-transition-animation.c @@ -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;