diff --git a/ChangeLog b/ChangeLog index b30755fc9..d5bd5d5f1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2007-07-26 Tomas Frydrych + + * clutter/clutter-behaviour-ellipse.h: + * clutter/clutter-behaviour-ellipse.c: + * tests/test-behave.c: + + Removed tilt paramter from ClutterBehaviourEllipse constructors; + Made angles to be relative to 12 o'clock; + Added direction property; + 2007-07-26 Emmanuele Bassi * clutter/clutter-types.h: diff --git a/clutter/clutter-behaviour-ellipse.c b/clutter/clutter-behaviour-ellipse.c index 48650abeb..a33069af8 100644 --- a/clutter/clutter-behaviour-ellipse.c +++ b/clutter/clutter-behaviour-ellipse.c @@ -82,7 +82,7 @@ struct _ClutterBehaviourEllipsePrivate ClutterAngle angle_begin; ClutterAngle angle_end; ClutterAngle angle_tilt; - + ClutterRotateDirection direction; }; @@ -675,13 +675,16 @@ clutter_behaviour_ellipse_set_angle_beginx (ClutterBehaviourEllipse *self, ClutterAngle angle_begin) { ClutterBehaviourEllipsePrivate *priv; - + ClutterAngle new_angle; + g_return_if_fail (CLUTTER_IS_BEHAVIOUR_ELLIPSE (self)); + new_angle = angle_begin - 256; + priv = self->priv; - if (priv->angle_begin != angle_begin) + if (priv->angle_begin != new_angle) { - priv->angle_begin = angle_begin; + priv->angle_begin = new_angle; g_object_notify (G_OBJECT (self), "angle-begin"); } } @@ -755,14 +758,17 @@ clutter_behaviour_ellipse_set_angle_endx (ClutterBehaviourEllipse *self, ClutterAngle angle_end) { ClutterBehaviourEllipsePrivate *priv; + ClutterAngle new_angle; g_return_if_fail (CLUTTER_IS_BEHAVIOUR_ELLIPSE (self)); + new_angle = angle_end - 256; + priv = self->priv; - if (priv->angle_end != angle_end) + if (priv->angle_end != new_angle) { - priv->angle_end = angle_end; + priv->angle_end = new_angle; g_object_notify (G_OBJECT (self), "angle-end"); } @@ -837,14 +843,17 @@ clutter_behaviour_ellipse_set_angle_tiltx (ClutterBehaviourEllipse *self, ClutterAngle angle_tilt) { ClutterBehaviourEllipsePrivate *priv; + ClutterAngle new_angle; g_return_if_fail (CLUTTER_IS_BEHAVIOUR_ELLIPSE (self)); + new_angle = angle_tilt - 256; + priv = self->priv; - if (priv->angle_tilt != angle_tilt) + if (priv->angle_tilt != new_angle) { - priv->angle_tilt = angle_tilt; + priv->angle_tilt = new_angle; g_object_notify (G_OBJECT (self), "angle-tilt"); } diff --git a/tests/test-behave.c b/tests/test-behave.c index 0943c02a4..fc0f4629c 100644 --- a/tests/test-behave.c +++ b/tests/test-behave.c @@ -172,7 +172,8 @@ main (int argc, char *argv[]) p_behave = clutter_behaviour_ellipse_new (alpha, 200, 200, 400, 300, 0.0, 360.0); - g_object_set (p_behave, "angle-tilt", 45.0, NULL); + + clutter_behaviour_ellipse_set_angle_tilt (p_behave, 45.0); break; case PATH_BSPLINE: