2008-11-13 Emmanuele Bassi <ebassi@linux.intel.com>

* clutter/clutter-behaviour-ellipse.c:
	(clutter_behaviour_ellipse_applied): Do not reset the depth
	of the actors to which the Ellipse behaviour has been applied
	to, unless the behaviour is going to update it because it has
	a tilt on the X or Y axis.
This commit is contained in:
Emmanuele Bassi 2008-11-13 10:54:06 +00:00
parent eb9799098b
commit bb6751b84b
2 changed files with 18 additions and 11 deletions

View File

@ -1,3 +1,11 @@
2008-11-13 Emmanuele Bassi <ebassi@linux.intel.com>
* clutter/clutter-behaviour-ellipse.c:
(clutter_behaviour_ellipse_applied): Do not reset the depth
of the actors to which the Ellipse behaviour has been applied
to, unless the behaviour is going to update it because it has
a tilt on the X or Y axis.
2008-11-13 Neil Roberts <neil@linux.intel.com>
* clutter/clutter-actor.c (clutter_actor_get_reactive)

View File

@ -32,8 +32,9 @@
* #ClutterBehaviourEllipse interpolates actors along a path defined by
* an ellipse.
*
* Note, on applying an ellipse behaviour to an actor its position will
* be set to what is dictated by the ellipses initial position.
* <note><para>When applying an ellipse behaviour to an actor, the
* behaviour will update the actor's position and depth and set them
* to what is dictated by the ellipses initial position.</para></note>
*
* Since: 0.4
*/
@ -339,20 +340,18 @@ clutter_behaviour_ellipse_applied (ClutterBehaviour *behave,
ClutterActor *actor)
{
ClutterBehaviourEllipse *e = CLUTTER_BEHAVIOUR_ELLIPSE (behave);
knot3d knot;
ClutterBehaviourEllipsePrivate *priv = e->priv;;
knot3d knot = { 0, };
clutter_behaviour_ellipse_advance (e, e->priv->angle_start, &knot);
clutter_behaviour_ellipse_advance (e, priv->angle_start, &knot);
clutter_actor_set_position (actor, knot.x, knot.y);
clutter_actor_set_depth (actor, knot.z);
#if 0
/* no need to chain up: ClutterBehaviourEllipse's parent class does
* not have a class closure for ::apply
/* the depth should be changed only if there is a tilt on
* any of the X or the Y axis
*/
if (CLUTTER_BEHAVIOUR_CLASS (clutter_behaviour_ellipse_parent_class)->apply)
CLUTTER_BEHAVIOUR_CLASS (clutter_behaviour_ellipse_parent_class)->apply (behave, actor);
#endif
if (priv->angle_tilt_x != 0 || priv->angle_tilt_y != 0)
clutter_actor_set_depth (actor, knot.z);
}
static void