From a8609eefc1094c3622e19e9ca27d8348e08b193e Mon Sep 17 00:00:00 2001 From: lecoanet Date: Mon, 26 Jan 2004 10:32:47 +0000 Subject: * (Pick): Added a quick bbox test for intersection between the pick halo bbox and item bboxes. * (ToArea, Pick): Added the override atomic feature. * (ComputeCoordinates): The group bbox is clipped on the clip item bounding box. --- generic/Group.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/generic/Group.c b/generic/Group.c index 8af883d..737c064 100644 --- a/generic/Group.c +++ b/generic/Group.c @@ -681,6 +681,7 @@ ComputeCoordinates(ZnItem item, ZnItem current_item; ZnItem *deps; int num_deps, i; + ZnBBox *clip_box; PushTransform(item); /* printf("Group.c\n"); @@ -783,6 +784,14 @@ ComputeCoordinates(ZnItem item, ZnAddBBoxToBBox(&item->item_bounding_box, ¤t_item->item_bounding_box); current_item = current_item->next; } + /* + * Limit the group actual bounding box to + * the clip shape boundary. + */ + if (group->clip) { + clip_box = &group->clip->item_bounding_box; + ZnIntersectBBox(&item->item_bounding_box, clip_box, &item->item_bounding_box); + } item->inv_flags = 0; PopClip(group, False); @@ -855,7 +864,7 @@ ToArea(ZnItem item, * ask the child groups to report instead of adding their * children to the result. */ - atomic = ISSET(item->flags, ATOMIC_BIT); + atomic = ISSET(item->flags, ATOMIC_BIT) && !ta->override_atomic; ta->report |= atomic; } @@ -1211,7 +1220,7 @@ Pick(ZnItem item, } current_item = (ps->start_item == ZN_NO_ITEM) ? group->head : ps->start_item; - atomic = ISSET(item->flags, ATOMIC_BIT); + atomic = ISSET(item->flags, ATOMIC_BIT) && !ps->override_atomic; for ( ; current_item != ZN_NO_ITEM; current_item = current_item->next) { /* @@ -1223,6 +1232,10 @@ Pick(ZnItem item, ISCLEAR(current_item->flags, ZN_VISIBLE_BIT)) { continue; } + ZnIntersectBBox(&bbox, ¤t_item->item_bounding_box, &inter); + if (ZnIsEmptyBBox(&inter)) { + continue; + } if (current_item->class != ZnGroup) { PushTransform(current_item); p_item = ps->a_item; -- cgit v1.1