From 57468a696e1259c1e1c185fc60230e1d195defb7 Mon Sep 17 00:00:00 2001 From: Alan Hourihane Date: Fri, 4 Jan 2008 12:37:55 +0000 Subject: [PATCH] Fix Line drawing with CapNotLast set in PolySegment. --- exa/exa_accel.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/exa/exa_accel.c b/exa/exa_accel.c index ae951ed9a..c2bfdee6b 100644 --- a/exa/exa_accel.c +++ b/exa/exa_accel.c @@ -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);