mirror of
https://github.com/brl/mutter.git
synced 2024-12-24 12:02:04 +00:00
clone: Do not use get_allocation_geometry()
Another nail in ClutterGeometry's coffin.
This commit is contained in:
parent
7a59b69f96
commit
699a1876d4
@ -124,10 +124,8 @@ static void
|
|||||||
clutter_clone_apply_transform (ClutterActor *self, CoglMatrix *matrix)
|
clutter_clone_apply_transform (ClutterActor *self, CoglMatrix *matrix)
|
||||||
{
|
{
|
||||||
ClutterClonePrivate *priv = CLUTTER_CLONE (self)->priv;
|
ClutterClonePrivate *priv = CLUTTER_CLONE (self)->priv;
|
||||||
ClutterGeometry geom;
|
ClutterActorBox box, source_box;
|
||||||
ClutterGeometry source_geom;
|
gfloat x_scale, y_scale;
|
||||||
gfloat x_scale;
|
|
||||||
gfloat y_scale;
|
|
||||||
|
|
||||||
/* First chain up and apply all the standard ClutterActor
|
/* First chain up and apply all the standard ClutterActor
|
||||||
* transformations... */
|
* transformations... */
|
||||||
@ -139,16 +137,18 @@ clutter_clone_apply_transform (ClutterActor *self, CoglMatrix *matrix)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
/* get our allocated size */
|
/* 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 */
|
/* 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
|
/* We need to scale what the clone-source actor paints to fill our own
|
||||||
* allocation...
|
* allocation...
|
||||||
*/
|
*/
|
||||||
x_scale = (gfloat) geom.width / source_geom.width;
|
x_scale = clutter_actor_box_get_width (&box)
|
||||||
y_scale = (gfloat) geom.height / source_geom.height;
|
/ 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);
|
cogl_matrix_scale (matrix, x_scale, y_scale, x_scale);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user