summaryrefslogtreecommitdiff
path: root/exa/exa_accel.c
diff options
context:
space:
mode:
authorAlan Hourihane <alanh@tungstengraphics.com>2008-01-04 12:37:55 +0000
committerAlan Hourihane <alanh@tungstengraphics.com>2008-01-04 12:37:55 +0000
commit57468a696e1259c1e1c185fc60230e1d195defb7 (patch)
tree36f71d148f64b3480aeeaaf8d8ee7c73620daee3 /exa/exa_accel.c
parent39cb782f28be4efb2621fd8c614f2367eb834412 (diff)
Fix Line drawing with CapNotLast set in PolySegment.
Diffstat (limited to 'exa/exa_accel.c')
-rw-r--r--exa/exa_accel.c8
1 files changed, 8 insertions, 0 deletions
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);