diff options
Diffstat (limited to 'generic/Curve.c')
-rw-r--r-- | generic/Curve.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/generic/Curve.c b/generic/Curve.c index 9ea09de..79d7cf8 100644 --- a/generic/Curve.c +++ b/generic/Curve.c @@ -74,7 +74,7 @@ typedef struct _CurveItemStruct { /* Public data */ ZnPoly shape; - unsigned int flags; + unsigned short flags; Pixmap marker; ZnLineEnd first_end; /* These two are considered only if relief is flat */ ZnLineEnd last_end; @@ -297,7 +297,12 @@ Clone(Item item) ZnBool *holes; POLY_INIT(&cv->dev_shape); - cv->grad_geo = NULL; + + if (cv->grad_geo) { + ZnPoint *grad_geo = ZnMalloc(4*sizeof(ZnPoint)); + memcpy(grad_geo, cv->grad_geo, 4*sizeof(ZnPoint)); + cv->grad_geo = grad_geo; + } if (cv->shape.num_contours) { conts = cv->shape.contours; @@ -1304,14 +1309,12 @@ Render(Item item) else { ZnLineEnd first = ISSET(cv->flags, FIRST_END_OK) ? cv->first_end : NULL; ZnLineEnd last = ISSET(cv->flags, LAST_END_OK) ? cv->last_end : NULL; - ZnBool closed = ISSET(cv->flags, CLOSED_BIT); for (j = 0; j < cv->dev_shape.num_contours; j++) { RenderPolyline(wi, cv->dev_shape.contours[j].points, cv->dev_shape.contours[j].num_points, - cv->line_width, closed, - cv->line_style, cv->cap_style, cv->join_style, + cv->line_width, cv->line_style, cv->cap_style, cv->join_style, first, last, cv->line_color); } } |