From 5f749ad978fbfeb5d39e4f15d8cddbc06fd0b9cb Mon Sep 17 00:00:00 2001 From: lecoanet Date: Fri, 30 Apr 2004 14:19:20 +0000 Subject: Modification of ZnQueryAttribute signature Adaptation for the new global variables Reworking of the class structure Fixed a bug in PopTransform causing a core dump under Windows (and potentially elsewhere). Modifs to adapt the Rendering when the scissors are not active. --- generic/Group.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/generic/Group.c b/generic/Group.c index 15d4100..509bd6f 100644 --- a/generic/Group.c +++ b/generic/Group.c @@ -471,7 +471,7 @@ Query(ZnItem item, int argc __unused, Tcl_Obj *CONST argv[]) { - if (ZnQueryAttribute(item->wi, item, group_attrs, argv[0]) == TCL_ERROR) { + if (ZnQueryAttribute(item->wi->interp, item, group_attrs, argv[0]) == TCL_ERROR) { return TCL_ERROR; } @@ -590,7 +590,7 @@ PopTransform(ZnItem item) pos = NULL; if (item->class->pos_offset >= 0) { - pos = ((void *) item) + item->class->pos_offset; + pos = (ZnPoint *) (((char *) item) + item->class->pos_offset); if (pos->x == 0 && pos->y == 0) { pos = NULL; } @@ -1077,7 +1077,7 @@ Render(ZnItem item) PushTransform(item); PushClip(group, True); #ifdef GL_DAMAGE - if (group->clip != ZN_NO_ITEM) { + if (ISCLEAR(wi->flags, ZN_CONFIGURE_EVENT) && (group->clip != ZN_NO_ITEM)) { old_damaged_area = wi->damaged_area; if (ZnCurrentClip(wi, NULL, &clip_box, NULL)) { ZnIntersectBBox(&wi->damaged_area, clip_box, &bbox); @@ -1091,7 +1091,7 @@ Render(ZnItem item) if (ISSET(current_item->flags, ZN_VISIBLE_BIT)) { #ifdef GL_DAMAGE ZnIntersectBBox(&wi->damaged_area, ¤t_item->item_bounding_box, &bbox); - if (!ZnIsEmptyBBox(&bbox)) { + if (!ZnIsEmptyBBox(&bbox) || ISSET(wi->flags, ZN_CONFIGURE_EVENT)) { #endif if (current_item->class != ZnGroup) { PushTransform(current_item); @@ -1112,7 +1112,7 @@ Render(ZnItem item) } #ifdef GL_DAMAGE - if (group->clip != ZN_NO_ITEM) { + if (ISCLEAR(wi->flags, ZN_CONFIGURE_EVENT) && (group->clip != ZN_NO_ITEM)) { wi->damaged_area = old_damaged_area; } #endif @@ -1345,8 +1345,8 @@ Coords(ZnItem item, else if ((cmd == ZN_COORDS_READ) || (cmd == ZN_COORDS_READ_ALL)) { ZnPoint *p; - ZnListAssertSize(item->wi->work_pts, 1); - p = (ZnPoint *) ZnListArray(item->wi->work_pts); + ZnListAssertSize(ZnWorkPoints, 1); + p = (ZnPoint *) ZnListArray(ZnWorkPoints); ZnTransfoDecompose(item->transfo, NULL, p, NULL, NULL); *num_pts = 1; *pts = p; @@ -1692,11 +1692,11 @@ GetAnchor(ZnItem item, ********************************************************************************** */ static ZnItemClassStruct GROUP_ITEM_CLASS = { - sizeof(GroupItemStruct), - 0, /* num_parts */ - False, /* has_anchors */ "group", + sizeof(GroupItemStruct), group_attrs, + 0, /* num_parts */ + ZN_CLASS_ONE_COORD, /* flags */ -1, Init, Clone, -- cgit v1.1