#include <glib-object.h>
#include <gobject/gvaluecollector.h>
+#include "clutter-color.h"
+#include "clutter-fixed.h"
#include "clutter-interval.h"
#include "clutter-units.h"
-#include "clutter-fixed.h"
enum
{
g_value_set_boolean (value, FALSE);
break;
+ case G_TYPE_BOXED:
+ if (value_type == CLUTTER_TYPE_COLOR)
+ {
+ const ClutterColor *ia, *ib;
+ ClutterColor res = { 0, };
+
+ ia = clutter_value_get_color (initial);
+ ib = clutter_value_get_color (final);
+
+ res.red = (factor * (ib->red - (gdouble) ia->red)) + ia->red;
+ res.green = (factor * (ib->green - (gdouble) ia->green)) + ia->green;
+ res.blue = (factor * (ib->blue - (gdouble) ia->blue)) + ia->blue;
+ res.alpha = (factor * (ib->alpha - (gdouble) ia->alpha)) + ia->alpha;
+
+ clutter_value_set_color (value, &res);
+ }
+ break;
+
default:
break;
}
ClutterAnimation *animation;
gint old_x, old_y, new_x, new_y;
guint old_width, old_height, new_width, new_height;
- guint8 old_op, new_op;
gdouble new_angle;
ClutterVertex vertex = { 0, };
+ ClutterColor new_color = { 0, };
clutter_actor_get_position (actor, &old_x, &old_y);
clutter_actor_get_size (actor, &old_width, &old_height);
- old_op = clutter_actor_get_opacity (actor);
/* determine the final state of the animation depending on
* the state of the actor
new_y = old_y - 100;
new_width = old_width + 200;
new_height = old_height + 200;
- new_op = 255;
new_angle = 360.0;
+
+ new_color.red = 0xdd;
+ new_color.green = 0x44;
+ new_color.blue = 0xdd;
+ new_color.alpha = 0xff;
}
else
{
new_y = old_y + 100;
new_width = old_width - 200;
new_height = old_height - 200;
- new_op = 128;
new_angle = 0.0;
+
+ new_color.red = 0x44;
+ new_color.green = 0xdd;
+ new_color.blue = 0x44;
+ new_color.alpha = 0x88;
}
vertex.x = CLUTTER_UNITS_FROM_FLOAT ((float) new_width / 2);
"y", new_y,
"width", new_width,
"height", new_height,
- "opacity", new_op,
+ "color", &new_color,
"rotation-angle-z", new_angle,
"fixed::rotation-center-z", &vertex,
"fixed::reactive", FALSE,