+2007-08-22 Tomas Frydrych <tf@openedhand.com>
+
+ * clutter/clutter-behaviour-rotate.c:
+ * clutter/clutter-behaviour-ellipse.c:
+
+ Fixed CCW rotation in rotate behaviour (bug 483); fixed overall
+ path length calculation for angles > 360 in rotate and ellipse.
+
2007-08-22 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-main.c (clutter_threads_dispatch_free): Remove
holding the lock is unpredictable for the library. Leave a comment
with the relevant bug number in GNOME's Bugzilla and wait for a
fix in GLib.
-
+
2007-08-21 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-event.c: Correctly initialise the state
(clutter_sqrti):
Fixes for 64-bit platforms; use of SSE builtin when available
- (patches by Gwenole Beauchesne).
+ (bugs 478, 479, patches by Gwenole Beauchesne).
2007-08-20 Emmanuele Bassi <ebassi@openedhand.com>
priv->direction == CLUTTER_ROTATE_CCW)
{
ClutterAngle diff;
-
+ ClutterAngle angle_begin = priv->angle_begin + 256;
+ ClutterAngle angle_end = priv->angle_end + 256;
+
/* Work out the angular length of the arch represented by the
* end angle in CCW direction
*/
- if (priv->angle_end > 1024)
+ if (angle_end >= 1024)
{
- gint rounds = priv->angle_end / 1024;
+ gint rounds = angle_end / 1024;
ClutterAngle a1 = rounds * 1024;
- ClutterAngle a2 = 1024 - (priv->angle_end - a1);
+ ClutterAngle a2 = - (angle_end - a1);
- diff = a1 + a2 + priv->angle_begin;
+ diff = a1 + a2 + angle_begin;
}
else
{
- diff = 1024 - priv->angle_end + priv->angle_begin;
+ diff = 1024 - angle_end + angle_begin;
}
angle = priv->angle_begin - (diff * alpha / CLUTTER_ALPHA_MAX_ALPHA);
priv->direction == CLUTTER_ROTATE_CW)
{
ClutterAngle diff;
+ ClutterAngle angle_begin = priv->angle_begin + 256;
+ ClutterAngle angle_end = priv->angle_end + 256;
/* Work out the angular length of the arch represented by the
* begin angle in CW direction
*/
- if (priv->angle_begin > 1024)
+ if (angle_begin >= 1024)
{
- gint rounds = priv->angle_begin/ 1024;
+ gint rounds = angle_begin / 1024;
ClutterAngle a1 = rounds * 1024;
- ClutterAngle a2 = 1024 - (priv->angle_begin - a1);
+ ClutterAngle a2 = - (angle_begin - a1);
- diff = a1 + a2 + priv->angle_end;
+ diff = a1 + a2 + angle_end;
}
else
{
- diff = 1024 - priv->angle_begin + priv->angle_end;
+ diff = 1024 - angle_begin + angle_end;
}
-
+
angle = priv->angle_begin + (diff * alpha / CLUTTER_ALPHA_MAX_ALPHA);
}
/* Work out the angular length of the arch represented by the
* end angle in CCW direction
*/
- if (priv->angle_end > CLUTTER_INT_TO_FIXED (360))
+ if (priv->angle_begin >= CLUTTER_INT_TO_FIXED (360))
{
ClutterFixed rounds, a1, a2;
rounds = priv->angle_begin / 360;
a1 = rounds * 360;
- a2 = CLUTTER_INT_TO_FIXED (360) - (priv->angle_begin - a1);
+ a2 = - (priv->angle_begin - a1);
diff = a1 + a2 + priv->angle_end;
}
{
angle = CLUTTER_FIXED_MUL (factor,
(priv->angle_begin - priv->angle_end));
- angle += priv->angle_end;
+ angle = priv->angle_begin - angle;
}
else
{
/* Work out the angular length of the arch represented by the
* end angle in CCW direction
*/
- if (priv->angle_end > CLUTTER_INT_TO_FIXED (360))
+ if (priv->angle_end >= CLUTTER_INT_TO_FIXED (360))
{
ClutterFixed rounds, a1, a2;
- rounds = priv->angle_begin / 360;
+ rounds = priv->angle_end / 360;
a1 = rounds * 360;
- a2 = CLUTTER_INT_TO_FIXED (360) - (priv->angle_end - a1);
+ a2 = - (priv->angle_end - a1);
diff = a1 + a2 + priv->angle_begin;
}