aboutsummaryrefslogtreecommitdiff
path: root/generic/Curve.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/Curve.c')
-rw-r--r--generic/Curve.c27
1 files changed, 13 insertions, 14 deletions
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);