aboutsummaryrefslogtreecommitdiff
path: root/generic/Group.c
diff options
context:
space:
mode:
authorlecoanet2004-01-26 10:32:47 +0000
committerlecoanet2004-01-26 10:32:47 +0000
commita8609eefc1094c3622e19e9ca27d8348e08b193e (patch)
treefa63b412d8697bdbdf40633270ce961e55d81063 /generic/Group.c
parent17582fcdc85dd015f99c5471170b20f4cf3f252d (diff)
downloadtkzinc-a8609eefc1094c3622e19e9ca27d8348e08b193e.zip
tkzinc-a8609eefc1094c3622e19e9ca27d8348e08b193e.tar.gz
tkzinc-a8609eefc1094c3622e19e9ca27d8348e08b193e.tar.bz2
tkzinc-a8609eefc1094c3622e19e9ca27d8348e08b193e.tar.xz
* (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.
Diffstat (limited to 'generic/Group.c')
-rw-r--r--generic/Group.c17
1 files 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, &current_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, &current_item->item_bounding_box, &inter);
+ if (ZnIsEmptyBBox(&inter)) {
+ continue;
+ }
if (current_item->class != ZnGroup) {
PushTransform(current_item);
p_item = ps->a_item;