static unsigned int nr_arena_group_update (NRArenaItem *item, NRRectL *area, NRGC *gc, unsigned int state, unsigned int reset) { unsigned int newstate; NRArenaGroup *group = NR_ARENA_GROUP (item); unsigned int beststate = NR_ARENA_ITEM_STATE_ALL; for (NRArenaItem *child = group->children; child != NULL; child = child->next) { NRGC cgc(gc); cgc.transform = group->child_transform * gc->transform; newstate = nr_arena_item_invoke_update (child, area, &cgc, state, reset); beststate = beststate & newstate; } if (beststate & NR_ARENA_ITEM_STATE_BBOX) { nr_rect_l_set_empty (&item->bbox); for (NRArenaItem *child = group->children; child != NULL; child = child->next) { if (child->visible) nr_rect_l_union (&item->bbox, &item->bbox, &child->drawbox); } } return beststate; }
static unsigned int nr_arena_group_update (NRArenaItem *item, NRRectL *area, NRGC *gc, unsigned int state, unsigned int reset) { NRArenaGroup *group; NRArenaItem *child; unsigned int newstate, beststate; group = NR_ARENA_GROUP (item); beststate = NR_ARENA_ITEM_STATE_ALL; for (child = group->children; child != NULL; child = child->next) { NRGC cgc; nr_matrix_multiply_dfd (&cgc.transform, &group->child_transform, &gc->transform); newstate = nr_arena_item_invoke_update (child, area, &cgc, state, reset); beststate = beststate & newstate; } if (beststate & NR_ARENA_ITEM_STATE_BBOX) { nr_rect_l_set_empty (&item->bbox); for (child = group->children; child != NULL; child = child->next) { nr_rect_l_union (&item->bbox, &item->bbox, &child->bbox); } } return beststate; }