Fixed box calculation in clutter_group_query_coords()
This commit is contained in:
parent
1677e9d263
commit
9958a1e6d2
@ -1,3 +1,9 @@
|
|||||||
|
2007-06-29 Tomas Frydrych <tf@openedhand.com>
|
||||||
|
|
||||||
|
* clutter/clutter-group.c:
|
||||||
|
(clutter_group_query_coords):
|
||||||
|
Fixed box calculation.
|
||||||
|
|
||||||
2007-06-28 Tomas Frydrych <tf@openedhand.com>
|
2007-06-28 Tomas Frydrych <tf@openedhand.com>
|
||||||
|
|
||||||
* clutter/clutter-group.c:
|
* clutter/clutter-group.c:
|
||||||
|
@ -156,19 +156,21 @@ clutter_group_query_coords (ClutterActor *self,
|
|||||||
/* if (CLUTTER_ACTOR_IS_VISIBLE (child)) */
|
/* if (CLUTTER_ACTOR_IS_VISIBLE (child)) */
|
||||||
{
|
{
|
||||||
ClutterActorBox cbox;
|
ClutterActorBox cbox;
|
||||||
|
|
||||||
clutter_actor_query_coords (child, &cbox);
|
clutter_actor_query_coords (child, &cbox);
|
||||||
|
|
||||||
/* Ignore any children with offscreen ( negaive )
|
/* Ignore any children with offscreen ( negaive )
|
||||||
* positions.
|
* positions.
|
||||||
*
|
*
|
||||||
* Also x1 and x2 will be set by parent caller.
|
* Also x1 and x2 will be set by parent caller.
|
||||||
*/
|
*
|
||||||
if (box->x2 == 0 || cbox.x2 > box->x2)
|
* FIXME: this assumes that children are not rotated in anyway.
|
||||||
box->x2 = cbox.x2;
|
*/
|
||||||
|
if (box->x2 - box->x1 < cbox.x2)
|
||||||
|
box->x2 = cbox.x2 + box->x1;
|
||||||
|
|
||||||
if (box->y2 == 0 || cbox.y2 > box->y2)
|
if (box->y2 - box->y1 < cbox.y2)
|
||||||
box->y2 = cbox.y2;
|
box->y2 = cbox.y2 + box->y1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
while ((child_item = g_list_next(child_item)) != NULL);
|
while ((child_item = g_list_next(child_item)) != NULL);
|
||||||
|
Loading…
Reference in New Issue
Block a user