From f35c1b1b92ed735acc9f44548de116adf9d27efd Mon Sep 17 00:00:00 2001 From: lecoanet Date: Fri, 22 Dec 2000 17:25:15 +0000 Subject: Implemente le clipping rectangulaire dans Render --- generic/Group.c | 18 +++++++++++++++--- 1 file 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); -- cgit v1.1