From 6e7c9eb14261e850df1401e7093c0b8092f50da4 Mon Sep 17 00:00:00 2001 From: lecoanet Date: Tue, 7 Mar 2000 14:53:57 +0000 Subject: * Correction de bug sur le tuilage. On utilise d�sormais le nom de l'image plutot que l'image. * Correction d'un core dump dans Configure lors d'une session interactive si un attribut est inconnu (l'erreur ne provoque pas l'arret). * Autorisation du relief pour les Beziers et les polys liss�s. --- generic/Curve.c | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) (limited to 'generic/Curve.c') diff --git a/generic/Curve.c b/generic/Curve.c index 0d17e09..59f6dd6 100644 --- a/generic/Curve.c +++ b/generic/Curve.c @@ -184,7 +184,7 @@ CvTileChange(ClientData client_data, { CurveItem cv = (CurveItem) client_data; - InvalidateImage(cv->tile); + InvalidateImage(cv->tile_name); ITEM.Invalidate((Item) cv, ZN_COORDS_FLAG); } @@ -372,13 +372,13 @@ Destroy(Item item) if (cv->gradient) { ZnFreeColorGradient(cv->gradient); } - if (strlen(cv->tile_name) != 0) { - ZnFree(cv->tile_name); - } if (cv->tile != ZnUnspecifiedImage) { Tk_FreeImage(cv->tile); cv->tile = ZnUnspecifiedImage; } + if (strlen(cv->tile_name) != 0) { + ZnFree(cv->tile_name); + } if (cv->line_pattern != ZnUnspecifiedPattern) { Tk_FreeBitmap(wi->dpy, cv->line_pattern); } @@ -419,8 +419,8 @@ SetRenderFlags(CurveItem cv) ASSIGN(cv->flags, RELIEF_OK, (cv->relief != RELIEF_FLAT) && (ZnListSize(cv->points) > 1) && - (cv->line_width > 1) && ISCLEAR(cv->flags, SMOOTHED_OK) && - ISCLEAR(cv->flags, BEZIER_OK)); + (cv->line_width > 1)/* && ISCLEAR(cv->flags, SMOOTHED_OK) && + ISCLEAR(cv->flags, BEZIER_OK)*/); ASSIGN(cv->flags, MARKER_OK, (cv->marker != ZnUnspecifiedPattern) && ISCLEAR(cv->flags, BEZIER_OK) && @@ -453,11 +453,10 @@ Configure(Item item, { WidgetInfo *wi = item->wi; CurveItem cv = (CurveItem) item; - - if (ITEM_P.ConfigureAttributes((char *) item, -1, argc, argv, flags) == ZN_ERROR) { - return ZN_ERROR; - } + int status = ZN_OK; + status = ITEM_P.ConfigureAttributes((char *) item, -1, argc, argv, flags); + if (cv->gradient && (ISSET(*flags, ZN_BORDER_FLAG) || (cv->relief == RELIEF_FLAT))) { ZnFreeColorGradient(cv->gradient); @@ -465,7 +464,7 @@ Configure(Item item, } if ((cv->relief != RELIEF_FLAT) && !cv->gradient) { cv->gradient = ZnGetReliefGradient(wi->interp, wi->win, - ZnNameOfColor(cv->fill_color)); + ZnNameOfColor(cv->fill_color)); } if (ISSET(*flags, ZN_TILE_FLAG)) { Tk_Image tile; @@ -478,7 +477,7 @@ Configure(Item item, * The name will not be in sync with the image in * this case. */ - return ZN_ERROR; + status = ZN_ERROR; } } else { @@ -492,7 +491,7 @@ Configure(Item item, SetRenderFlags(cv); - return ZN_OK; + return status; } @@ -884,7 +883,7 @@ Draw(Item item) values.foreground = ZnPixel(cv->fill_color); gc_mask = GCFillStyle; if (cv->tile != ZnUnspecifiedImage) { /* Fill tiled */ - Pixmap pmap = GetImagePixmap(wi->win, cv->tile); + Pixmap pmap = GetImagePixmap(wi->win, cv->tile_name, cv->tile, NULL); values.fill_style = FillTiled; values.tile = pmap; values.ts_x_origin = REAL_TO_INT(item->item_bounding_box.orig.x); -- cgit v1.1