From 9ec8c046838efe3d88077854505ffcaf0cc2b18f Mon Sep 17 00:00:00 2001 From: lecoanet Date: Tue, 5 Nov 2002 09:29:25 +0000 Subject: Correction pour permettre de forcer la mise � jour d'une bitmap/image suite � sa modification interne. Prise en compte des modifs de la structure tristrip. --- generic/Item.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/generic/Item.c b/generic/Item.c index b2b6a6a..1bf6cb7 100644 --- a/generic/Item.c +++ b/generic/Item.c @@ -336,12 +336,18 @@ ZnConfigureAttributes(WidgetInfo *wi, case ZN_CONFIG_BITMAP: { ZnImage image = ZnUnspecifiedImage; - char *msg, *name = ""; + char *msg; +#if 0 + char *name = ""; + if (*((ZnImage *) valp) != ZnUnspecifiedImage) { name = ZnNameOfImage(*((ZnImage *) valp)); } +#endif str = Tcl_GetString(args[i+1]); +#if 0 if (strcmp(name, str) != 0) { +#endif if (strlen(str) != 0) { if (desc->type == ZN_CONFIG_IMAGE) { image = ZnGetImage(wi, str); @@ -361,7 +367,9 @@ ZnConfigureAttributes(WidgetInfo *wi, } *((ZnImage *) valp) = image; *flags |= desc->flags; +#if 0 } +#endif break; } case ZN_CONFIG_BITMAP_LIST: @@ -2289,7 +2297,10 @@ ZnPushClip(WidgetInfo *wi, * the tristrip, so we can use the corresponding * polygon instead of going through all the triangles. */ - if (tristrip->fan) { + if (tristrip->strips[j].fan) { + /* Skip the center */ + p++; + num_pts--; xp2 = xpts2 = ZnMalloc(num_pts*sizeof(XPoint)); for (i = 0 ; i < num_pts; i++, p++, xp2++) { xp2->x = (short) p->x; @@ -2369,9 +2380,8 @@ ZnPushClip(WidgetInfo *wi, for (j = 0; j < tristrip->num_strips; j++) { num_pts = tristrip->strips[j].num_points; p = tristrip->strips[j].points; - if (tristrip->fan) { + if (tristrip->strips[j].fan) { glBegin(GL_TRIANGLE_FAN); - glVertex2f(tristrip->center.x, tristrip->center.y); } else { glBegin(GL_TRIANGLE_STRIP); -- cgit v1.1