aboutsummaryrefslogtreecommitdiff
path: root/generic
diff options
context:
space:
mode:
Diffstat (limited to 'generic')
-rw-r--r--generic/Arc.c25
1 files 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;
}