EXA: Fix off-by-one in polyline drawing.

This commit is contained in:
Pierre Willenbrock 2007-10-23 16:45:13 +02:00 committed by Michel Dänzer
parent a8a148919b
commit d502521c36

View File

@ -658,7 +658,7 @@ exaPolylines(DrawablePtr pDrawable, GCPtr pGC, int mode, int npt,
x1 = ppt[0].x; x1 = ppt[0].x;
y1 = ppt[0].y; y1 = ppt[0].y;
/* If we have any non-horizontal/vertical, fall back. */ /* If we have any non-horizontal/vertical, fall back. */
for (i = 0; i < npt; i++) { for (i = 0; i < npt - 1; i++) {
if (mode == CoordModePrevious) { if (mode == CoordModePrevious) {
x2 = x1 + ppt[i + 1].x; x2 = x1 + ppt[i + 1].x;
y2 = y1 + ppt[i + 1].y; y2 = y1 + ppt[i + 1].y;