* clutter/clutter-timeline.c (clutter_timeline_get_progressx): Fix
	arithmetic for calculating the reverse progress when the timeline
	is backward. (Should subtract from one instead of taking the
	reciprocal).
This commit is contained in:
Neil Roberts 2008-04-14 11:07:34 +00:00
parent 0b8a500fca
commit f7b53e6004
2 changed files with 17 additions and 6 deletions

View File

@ -1,3 +1,12 @@
2008-04-14 Neil Roberts <neil@o-hand.com>
Bug #853
* clutter/clutter-timeline.c (clutter_timeline_get_progressx): Fix
arithmetic for calculating the reverse progress when the timeline
is backward. (Should subtract from one instead of taking the
reciprocal).
2008-04-13 Neil Roberts <neil@o-hand.com>
Upgraded the Win32 backend to work with the multi-stage

View File

@ -1304,17 +1304,19 @@ ClutterFixed
clutter_timeline_get_progressx (ClutterTimeline *timeline)
{
ClutterTimelinePrivate *priv;
ClutterFixed progress;
g_return_val_if_fail (CLUTTER_IS_TIMELINE (timeline), 0);
priv = timeline->priv;
if (priv->direction == CLUTTER_TIMELINE_FORWARD)
return CLUTTER_FIXED_DIV (CLUTTER_INT_TO_FIXED (priv->current_frame_num),
CLUTTER_INT_TO_FIXED (priv->n_frames));
else
return CLUTTER_FIXED_DIV (CLUTTER_INT_TO_FIXED (priv->n_frames),
CLUTTER_INT_TO_FIXED (priv->current_frame_num));
progress = CLUTTER_FIXED_DIV (CLUTTER_INT_TO_FIXED (priv->current_frame_num),
CLUTTER_INT_TO_FIXED (priv->n_frames));
if (priv->direction == CLUTTER_TIMELINE_BACKWARD)
progress = CFX_ONE - progress;
return progress;
}
/**