[clutter] clone: Do not use get_allocation_geometry()
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [clutter] clone: Do not use get_allocation_geometry()
- Date: Sat, 11 Aug 2012 11:35:30 +0000 (UTC)
commit 699a1876d4ee63412b9348b695cf372d4e174a74
Author: Emmanuele Bassi <ebassi gnome org>
Date: Fri Aug 10 14:06:14 2012 +0100
clone: Do not use get_allocation_geometry()
Another nail in ClutterGeometry's coffin.
clutter/clutter-clone.c | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/clutter/clutter-clone.c b/clutter/clutter-clone.c
index c73cda3..6a82beb 100644
--- a/clutter/clutter-clone.c
+++ b/clutter/clutter-clone.c
@@ -124,10 +124,8 @@ static void
clutter_clone_apply_transform (ClutterActor *self, CoglMatrix *matrix)
{
ClutterClonePrivate *priv = CLUTTER_CLONE (self)->priv;
- ClutterGeometry geom;
- ClutterGeometry source_geom;
- gfloat x_scale;
- gfloat y_scale;
+ ClutterActorBox box, source_box;
+ gfloat x_scale, y_scale;
/* First chain up and apply all the standard ClutterActor
* transformations... */
@@ -139,16 +137,18 @@ clutter_clone_apply_transform (ClutterActor *self, CoglMatrix *matrix)
return;
/* get our allocated size */
- clutter_actor_get_allocation_geometry (self, &geom);
+ clutter_actor_get_allocation_box (self, &box);
/* and get the allocated size of the source */
- clutter_actor_get_allocation_geometry (priv->clone_source, &source_geom);
+ clutter_actor_get_allocation_box (priv->clone_source, &source_box);
/* We need to scale what the clone-source actor paints to fill our own
* allocation...
*/
- x_scale = (gfloat) geom.width / source_geom.width;
- y_scale = (gfloat) geom.height / source_geom.height;
+ x_scale = clutter_actor_box_get_width (&box)
+ / clutter_actor_box_get_width (&source_box);
+ y_scale = clutter_actor_box_get_height (&box)
+ / clutter_actor_box_get_height (&source_box);
cogl_matrix_scale (matrix, x_scale, y_scale, x_scale);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]