Fix Line drawing with CapNotLast set in PolySegment.

This commit is contained in:
Alan Hourihane 2008-01-04 12:37:55 +00:00
parent 39cb782f28
commit 57468a696e

View File

@ -739,6 +739,14 @@ exaPolySegment (DrawablePtr pDrawable, GCPtr pGC, int nseg,
prect[i].y = pSeg[i].y2;
prect[i].height = pSeg[i].y1 - pSeg[i].y2 + 1;
}
/* don't paint last pixel */
if (pGC->capStyle == CapNotLast) {
if (prect[i].width == 1)
prect[i].height--;
else
prect[i].width--;
}
}
pGC->ops->PolyFillRect(pDrawable, pGC, nseg, prect);
xfree(prect);