aboutsummaryrefslogtreecommitdiff
path: root/generic/Group.c
diff options
context:
space:
mode:
authorlecoanet2000-12-22 17:25:15 +0000
committerlecoanet2000-12-22 17:25:15 +0000
commitf35c1b1b92ed735acc9f44548de116adf9d27efd (patch)
tree86170405080d78ec5fa5b9166560226a6dfe3762 /generic/Group.c
parentc364248f68232b9ab2cf82a448c1412b5a71146b (diff)
downloadtkzinc-f35c1b1b92ed735acc9f44548de116adf9d27efd.zip
tkzinc-f35c1b1b92ed735acc9f44548de116adf9d27efd.tar.gz
tkzinc-f35c1b1b92ed735acc9f44548de116adf9d27efd.tar.bz2
tkzinc-f35c1b1b92ed735acc9f44548de116adf9d27efd.tar.xz
Implemente le clipping rectangulaire dans Render
Diffstat (limited to 'generic/Group.c')
-rw-r--r--generic/Group.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/generic/Group.c b/generic/Group.c
index 1cd79ae..67b30fa 100644
--- a/generic/Group.c
+++ b/generic/Group.c
@@ -516,7 +516,7 @@ static void
CallRegularCC(Item item)
{
WidgetInfo *wi = item->wi;
- ZnBBox *clip_box;
+ /*ZnBBox *clip_box;*/
/*
* Do some generic pre-work in behalf of the (regular) children.
@@ -536,12 +536,15 @@ CallRegularCC(Item item)
* the following predicate is thus valid for testing
* a clipbox.
*/
- if (ITEM_P.CurrentClip(wi, NULL, &clip_box, NULL)) {
+ /* Tue Nov 14 15:21:05 2000 Suppressed to have a constant
+ bbox to align tiles. Have to watch any possible breakage.
+
+ if (ITEM_P.CurrentClip(wi, NULL, &clip_box, NULL)) {
ZnBBox inter;
IntersectBBox(&item->item_bounding_box, clip_box, &inter);
item->item_bounding_box = inter;
- }
+ }*/
/*
* Do some generic post-work in behalf of the (regular) children.
*/
@@ -851,6 +854,7 @@ Render(Item item)
WidgetInfo *wi = item->wi;
Item current_item;
ZnBBox bbox, old_damaged_area, *clip_box;
+ RenderBuf buf;
PushTransform(item);
PushClip(group, True);
@@ -859,6 +863,13 @@ Render(Item item)
old_damaged_area = wi->damaged_area;
IntersectBBox(&wi->damaged_area, clip_box, &bbox);
wi->damaged_area = bbox;
+ buf = wi->buf;
+ wi->buf.ox = (int) wi->damaged_area.orig.x;
+ wi->buf.oy = (int) wi->damaged_area.orig.y;
+ wi->buf.cx = (int) wi->damaged_area.corner.x;
+ wi->buf.cy = (int) wi->damaged_area.corner.y;
+ wi->buf.buf += ((wi->buf.oy - buf.oy) * buf.rowstride +
+ (wi->buf.ox - buf.ox) * 3);
}
current_item = group->tail;
@@ -880,6 +891,7 @@ Render(Item item)
if (group->clip != ZN_NO_ITEM) {
wi->damaged_area = old_damaged_area;
+ wi->buf = buf;
}
PopClip(group, True);
PopTransform(item);