aboutsummaryrefslogtreecommitdiff
path: root/generic
diff options
context:
space:
mode:
Diffstat (limited to 'generic')
-rw-r--r--generic/Curve.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/generic/Curve.c b/generic/Curve.c
index 901f331..39f9aee 100644
--- a/generic/Curve.c
+++ b/generic/Curve.c
@@ -1190,7 +1190,7 @@ Draw(ZnItem item)
ZnWInfo *wi = item->wi;
CurveItem cv = (CurveItem) item;
XGCValues values;
- unsigned int i, j, num_points=0, num2;
+ unsigned int i, j, num_points=0;
unsigned int gc_mask;
ZnPoint *points=NULL;
XPoint *xpoints=NULL;
@@ -1304,17 +1304,14 @@ Draw(ZnItem item)
&values);
}
for (j = 0; j < cv->outlines.num_contours; j++) {
- num2 = num_points = cv->outlines.contours[j].num_points;
+ num_points = cv->outlines.contours[j].num_points;
points = cv->outlines.contours[j].points;
ZnListAssertSize(wi->work_xpts, num_points);
xpoints = ZnListArray(wi->work_xpts);
- for (i = 0; i < num2; i++) {
+ for (i = 0; i < num_points; i++) {
xpoints[i].x = ZnNearestInt(points[i].x);
xpoints[i].y = ZnNearestInt(points[i].y);
}
- if (ISSET(cv->flags, CLOSED_BIT)) {
- xpoints[num2] = xpoints[0];
- }
XDrawLines(wi->dpy, wi->draw_buffer, wi->gc,
xpoints, (int) num_points, CoordModeOrigin);
}