From 5be6710269df95ecbe5253a9298d727d17f5e002 Mon Sep 17 00:00:00 2001 From: lecoanet Date: Tue, 7 Mar 2000 15:03:18 +0000 Subject: * (GetClipVertices): Modifi� la r�ponse pour pr�venir un core dump en cas d'utilisation. * Correction du tuilage. On utilse d�sormais le nom de l'image au lieu del'image elle meme. * Correction d'un bug dans Configure apparaissant en mode interactif lors d'une erreur sur un nom d'attribut. --- generic/Arc.c | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/generic/Arc.c b/generic/Arc.c index 4477867..ea0f057 100644 --- a/generic/Arc.c +++ b/generic/Arc.c @@ -163,7 +163,7 @@ ArcTileChange(ClientData client_data, { ArcItem arc = (ArcItem) client_data; - InvalidateImage(arc->tile); + InvalidateImage(arc->tile_name); ITEM.Invalidate((Item) arc, ZN_COORDS_FLAG); } @@ -316,9 +316,6 @@ Destroy(Item item) if (arc->render_shape) { ZnListFree(arc->render_shape); } - if (strlen(arc->tile_name) != 0) { - ZnFree(arc->tile_name); - } if (arc->first_end) { LineEndDelete(arc->first_end); } @@ -329,6 +326,9 @@ Destroy(Item item) Tk_FreeImage(arc->tile); arc->tile = ZnUnspecifiedImage; } + if (strlen(arc->tile_name) != 0) { + ZnFree(arc->tile_name); + } if (arc->line_pattern != ZnUnspecifiedPattern) { Tk_FreeBitmap(wi->dpy, arc->line_pattern); } @@ -378,10 +378,9 @@ Configure(Item item, { WidgetInfo *wi = item->wi; ArcItem arc = (ArcItem) item; + int status = ZN_OK; - if (ITEM_P.ConfigureAttributes((char *) item, -1, argc, argv, flags) == ZN_ERROR) { - return ZN_ERROR; - } + status = ITEM_P.ConfigureAttributes((char *) item, -1, argc, argv, flags); if (ISSET(*flags, ZN_TILE_FLAG)) { Tk_Image tile; @@ -394,7 +393,7 @@ Configure(Item item, * The name will not be in sync with the image in * this case. */ - return ZN_ERROR; + status = ZN_ERROR; } } else { @@ -408,7 +407,7 @@ Configure(Item item, SetRenderFlags(arc); - return ZN_OK; + return status; } @@ -1020,7 +1019,7 @@ Draw(Item item) values.foreground = ZnPixel(arc->fill_color); values.arc_mode = ISSET(arc->flags, PIE_SLICE_BIT) ? ArcPieSlice : ArcChord; if (arc->tile != ZnUnspecifiedImage) { /* Fill Tiled */ - Pixmap pmap = GetImagePixmap(wi->win, arc->tile); + Pixmap pmap = GetImagePixmap(wi->win, arc->tile_name, arc->tile, NULL); values.fill_style = FillTiled; values.tile = pmap; values.ts_x_origin = (int) item->item_bounding_box.orig.x; @@ -1473,7 +1472,11 @@ GetClipVertices(Item item, ZnPoint **points, int *num_points) { - return False; + /* + * Not yet implemented. + */ + *num_points = 0; + return True; } -- cgit v1.1