mirror of
https://github.com/brl/mutter.git
synced 2025-05-07 23:54:56 +00:00
* clutter/clutter-actor.[ch]: (clutter_actor_set_rotationx),
(clutter_actor_set_rotation): swapped axis and angle around, the new argument order is: (axis, angle, x, y, z). Also removed deprecated rotation functions from header. Updated use of clutter_actor_set_rotation? in the following files: * clutter/clutter-behaviour-rotate.c: * clutter/clutter-effect.c: * tests/test-actors.c: * tests/test-project.c:
This commit is contained in:
parent
521162a01c
commit
990d0e90a5
14
ChangeLog
14
ChangeLog
@ -1,3 +1,17 @@
|
|||||||
|
2007-11-19 Øyvind Kolås <pippin@o-hand.com>
|
||||||
|
|
||||||
|
* clutter/clutter-actor.[ch]: (clutter_actor_set_rotationx),
|
||||||
|
(clutter_actor_set_rotation): swapped axis and angle around,
|
||||||
|
the new argument order is: (axis, angle, x, y, z). Also removed
|
||||||
|
deprecated rotation functions from header.
|
||||||
|
|
||||||
|
Updated use of clutter_actor_set_rotation? in the following files:
|
||||||
|
|
||||||
|
* clutter/clutter-behaviour-rotate.c:
|
||||||
|
* clutter/clutter-effect.c:
|
||||||
|
* tests/test-actors.c:
|
||||||
|
* tests/test-project.c:
|
||||||
|
|
||||||
2007-11-19 Emmanuele Bassi <ebassi@openedhand.com>
|
2007-11-19 Emmanuele Bassi <ebassi@openedhand.com>
|
||||||
|
|
||||||
* clutter/clutter-label.[ch]: Constify the color argument
|
* clutter/clutter-label.[ch]: Constify the color argument
|
||||||
|
@ -2569,8 +2569,8 @@ clutter_actor_get_depth (ClutterActor *self)
|
|||||||
/**
|
/**
|
||||||
* clutter_actor_set_rotationx:
|
* clutter_actor_set_rotationx:
|
||||||
* @self: a #ClutterActor
|
* @self: a #ClutterActor
|
||||||
* @angle: the angle of rotation
|
|
||||||
* @axis: the axis of rotation
|
* @axis: the axis of rotation
|
||||||
|
* @angle: the angle of rotation
|
||||||
* @x: X coordinate of the rotation center
|
* @x: X coordinate of the rotation center
|
||||||
* @y: Y coordinate of the rotation center
|
* @y: Y coordinate of the rotation center
|
||||||
* @z: Z coordinate of the rotation center
|
* @z: Z coordinate of the rotation center
|
||||||
@ -2583,8 +2583,8 @@ clutter_actor_get_depth (ClutterActor *self)
|
|||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
clutter_actor_set_rotationx (ClutterActor *self,
|
clutter_actor_set_rotationx (ClutterActor *self,
|
||||||
ClutterFixed angle,
|
|
||||||
ClutterRotateAxis axis,
|
ClutterRotateAxis axis,
|
||||||
|
ClutterFixed angle,
|
||||||
gint x,
|
gint x,
|
||||||
gint y,
|
gint y,
|
||||||
gint z)
|
gint z)
|
||||||
@ -2623,8 +2623,8 @@ clutter_actor_set_rotationx (ClutterActor *self,
|
|||||||
/**
|
/**
|
||||||
* clutter_actor_set_rotation:
|
* clutter_actor_set_rotation:
|
||||||
* @self: a #ClutterActor
|
* @self: a #ClutterActor
|
||||||
* @angle: the angle of rotation
|
|
||||||
* @axis: the axis of rotation
|
* @axis: the axis of rotation
|
||||||
|
* @angle: the angle of rotation
|
||||||
* @x: X coordinate of the rotation center
|
* @x: X coordinate of the rotation center
|
||||||
* @y: Y coordinate of the rotation center
|
* @y: Y coordinate of the rotation center
|
||||||
* @z: Z coordinate of the rotation center
|
* @z: Z coordinate of the rotation center
|
||||||
@ -2642,16 +2642,16 @@ clutter_actor_set_rotationx (ClutterActor *self,
|
|||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
clutter_actor_set_rotation (ClutterActor *self,
|
clutter_actor_set_rotation (ClutterActor *self,
|
||||||
gdouble angle,
|
|
||||||
ClutterRotateAxis axis,
|
ClutterRotateAxis axis,
|
||||||
|
gdouble angle,
|
||||||
gint x,
|
gint x,
|
||||||
gint y,
|
gint y,
|
||||||
gint z)
|
gint z)
|
||||||
{
|
{
|
||||||
g_return_if_fail (CLUTTER_IS_ACTOR (self));
|
g_return_if_fail (CLUTTER_IS_ACTOR (self));
|
||||||
|
|
||||||
clutter_actor_set_rotationx (self, CLUTTER_FLOAT_TO_FIXED (angle),
|
clutter_actor_set_rotationx (self, axis,
|
||||||
axis,
|
CLUTTER_FLOAT_TO_FIXED (angle),
|
||||||
x, y, z);
|
x, y, z);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -274,13 +274,14 @@ void clutter_actor_set_y (ClutterActor *sel
|
|||||||
gint y);
|
gint y);
|
||||||
|
|
||||||
void clutter_actor_set_rotation (ClutterActor *self,
|
void clutter_actor_set_rotation (ClutterActor *self,
|
||||||
gdouble angle,
|
|
||||||
ClutterRotateAxis axis,
|
ClutterRotateAxis axis,
|
||||||
|
gdouble angle,
|
||||||
gint x,
|
gint x,
|
||||||
gint y,
|
gint y,
|
||||||
gint z);void clutter_actor_set_rotationx (ClutterActor *self,
|
gint z);
|
||||||
ClutterFixed fixed,
|
void clutter_actor_set_rotationx (ClutterActor *self,
|
||||||
ClutterRotateAxis axis,
|
ClutterRotateAxis axis,
|
||||||
|
ClutterFixed fixed,
|
||||||
gint x,
|
gint x,
|
||||||
gint y,
|
gint y,
|
||||||
gint z);
|
gint z);
|
||||||
@ -294,36 +295,6 @@ ClutterFixed clutter_actor_get_rotationx (ClutterActor *sel
|
|||||||
gint *x,
|
gint *x,
|
||||||
gint *y,
|
gint *y,
|
||||||
gint *z);
|
gint *z);
|
||||||
void clutter_actor_rotate_x (ClutterActor *self,
|
|
||||||
gfloat angle,
|
|
||||||
gint y,
|
|
||||||
gint z);
|
|
||||||
void clutter_actor_rotate_y (ClutterActor *self,
|
|
||||||
gfloat angle,
|
|
||||||
gint x,
|
|
||||||
gint z);
|
|
||||||
void clutter_actor_rotate_z (ClutterActor *self,
|
|
||||||
gfloat angle,
|
|
||||||
gint x,
|
|
||||||
gint y);
|
|
||||||
void clutter_actor_rotate_xx (ClutterActor *self,
|
|
||||||
ClutterFixed angle,
|
|
||||||
gint y,
|
|
||||||
gint z);
|
|
||||||
void clutter_actor_rotate_yx (ClutterActor *self,
|
|
||||||
ClutterFixed angle,
|
|
||||||
gint x,
|
|
||||||
gint z);
|
|
||||||
void clutter_actor_rotate_zx (ClutterActor *self,
|
|
||||||
ClutterFixed angle,
|
|
||||||
gint x,
|
|
||||||
gint y);
|
|
||||||
gdouble clutter_actor_get_rxang (ClutterActor *self);
|
|
||||||
gdouble clutter_actor_get_ryang (ClutterActor *self);
|
|
||||||
gdouble clutter_actor_get_rzang (ClutterActor *self);
|
|
||||||
ClutterFixed clutter_actor_get_rxangx (ClutterActor *self);
|
|
||||||
ClutterFixed clutter_actor_get_ryangx (ClutterActor *self);
|
|
||||||
ClutterFixed clutter_actor_get_rzangx (ClutterActor *self);
|
|
||||||
|
|
||||||
void clutter_actor_set_opacity (ClutterActor *self,
|
void clutter_actor_set_opacity (ClutterActor *self,
|
||||||
guint8 opacity);
|
guint8 opacity);
|
||||||
|
@ -95,8 +95,8 @@ alpha_notify_foreach (ClutterBehaviour *behaviour,
|
|||||||
rotate_behaviour = CLUTTER_BEHAVIOUR_ROTATE (behaviour);
|
rotate_behaviour = CLUTTER_BEHAVIOUR_ROTATE (behaviour);
|
||||||
priv = rotate_behaviour->priv;
|
priv = rotate_behaviour->priv;
|
||||||
|
|
||||||
clutter_actor_set_rotationx (actor, angle,
|
clutter_actor_set_rotationx (actor, priv->axis,
|
||||||
priv->axis,
|
angle,
|
||||||
priv->center_x,
|
priv->center_x,
|
||||||
priv->center_y,
|
priv->center_y,
|
||||||
priv->center_z);
|
priv->center_z);
|
||||||
|
@ -743,8 +743,8 @@ clutter_effect_rotate_x (ClutterEffectTemplate *template_,
|
|||||||
c->completed_data = completed_data;
|
c->completed_data = completed_data;
|
||||||
|
|
||||||
|
|
||||||
clutter_actor_set_rotation (actor, angle_start,
|
clutter_actor_set_rotation (actor, CLUTTER_X_AXIS,
|
||||||
CLUTTER_X_AXIS,
|
angle_start,
|
||||||
0, center_y, center_z);
|
0, center_y, center_z);
|
||||||
|
|
||||||
c->behave = clutter_behaviour_rotate_new (c->alpha,
|
c->behave = clutter_behaviour_rotate_new (c->alpha,
|
||||||
@ -805,8 +805,8 @@ clutter_effect_rotate_y (ClutterEffectTemplate *template_,
|
|||||||
c->completed_data = completed_data;
|
c->completed_data = completed_data;
|
||||||
|
|
||||||
|
|
||||||
clutter_actor_set_rotation (actor, angle_start,
|
clutter_actor_set_rotation (actor, CLUTTER_Y_AXIS,
|
||||||
CLUTTER_Y_AXIS,
|
angle_start,
|
||||||
center_x, 0, center_z);
|
center_x, 0, center_z);
|
||||||
|
|
||||||
c->behave = clutter_behaviour_rotate_new (c->alpha,
|
c->behave = clutter_behaviour_rotate_new (c->alpha,
|
||||||
@ -867,8 +867,8 @@ clutter_effect_rotate_z (ClutterEffectTemplate *template_,
|
|||||||
c->completed_data = completed_data;
|
c->completed_data = completed_data;
|
||||||
|
|
||||||
|
|
||||||
clutter_actor_set_rotation (actor, angle_start,
|
clutter_actor_set_rotation (actor, CLUTTER_Z_AXIS,
|
||||||
CLUTTER_Z_AXIS,
|
angle_start,
|
||||||
center_x, center_y, 0);
|
center_x, center_y, 0);
|
||||||
|
|
||||||
c->behave = clutter_behaviour_rotate_new (c->alpha,
|
c->behave = clutter_behaviour_rotate_new (c->alpha,
|
||||||
|
@ -86,8 +86,9 @@ frame_cb (ClutterTimeline *timeline,
|
|||||||
gint i;
|
gint i;
|
||||||
|
|
||||||
/* Rotate everything clockwise about stage center*/
|
/* Rotate everything clockwise about stage center*/
|
||||||
clutter_actor_set_rotation (CLUTTER_ACTOR (oh->group), frame_num,
|
clutter_actor_set_rotation (CLUTTER_ACTOR (oh->group),
|
||||||
CLUTTER_Z_AXIS,
|
CLUTTER_Z_AXIS,
|
||||||
|
frame_num,
|
||||||
CLUTTER_STAGE_WIDTH() / 2,
|
CLUTTER_STAGE_WIDTH() / 2,
|
||||||
CLUTTER_STAGE_HEIGHT() / 2,
|
CLUTTER_STAGE_HEIGHT() / 2,
|
||||||
0);
|
0);
|
||||||
@ -104,8 +105,8 @@ frame_cb (ClutterTimeline *timeline,
|
|||||||
* FIXME: scaling causes drift so disabled for now. Need rotation
|
* FIXME: scaling causes drift so disabled for now. Need rotation
|
||||||
* unit based functions to fix.
|
* unit based functions to fix.
|
||||||
*/
|
*/
|
||||||
clutter_actor_set_rotation (oh->hand[i], - 6.0 * frame_num,
|
clutter_actor_set_rotation (oh->hand[i], CLUTTER_Z_AXIS,
|
||||||
CLUTTER_Z_AXIS,
|
- 6.0 * frame_num,
|
||||||
#if 0
|
#if 0
|
||||||
(clutter_actor_get_width (oh->hand[i]) / 2) * scale_x,
|
(clutter_actor_get_width (oh->hand[i]) / 2) * scale_x,
|
||||||
(clutter_actor_get_height (oh->hand[i]) / 2) * scale_y,
|
(clutter_actor_get_height (oh->hand[i]) / 2) * scale_y,
|
||||||
|
@ -216,7 +216,7 @@ main (int argc, char *argv[])
|
|||||||
rect = clutter_rectangle_new_with_color (&white);
|
rect = clutter_rectangle_new_with_color (&white);
|
||||||
clutter_actor_set_size (rect, 320, 240);
|
clutter_actor_set_size (rect, 320, 240);
|
||||||
clutter_actor_set_position (rect, 180, 120);
|
clutter_actor_set_position (rect, 180, 120);
|
||||||
clutter_actor_set_rotation (rect, 60, CLUTTER_Y_AXIS, 0, 0, 0);
|
clutter_actor_set_rotation (rect, CLUTTER_Y_AXIS, 60, 0, 0, 0);
|
||||||
clutter_group_add (CLUTTER_GROUP (main_stage), rect);
|
clutter_group_add (CLUTTER_GROUP (main_stage), rect);
|
||||||
|
|
||||||
label = clutter_label_new_with_text ("Mono 8pt", "Drag the blue rectangles");
|
label = clutter_label_new_with_text ("Mono 8pt", "Drag the blue rectangles");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user