mirror of
https://github.com/X11Libre/xserver.git
synced 2026-10-15 00:13:28 +00:00
Fix Line drawing with CapNotLast set in PolySegment.
This commit is contained in:
parent
39cb782f28
commit
57468a696e
1 changed files with 8 additions and 0 deletions
|
|
@ -739,6 +739,14 @@ exaPolySegment (DrawablePtr pDrawable, GCPtr pGC, int nseg,
|
||||||
prect[i].y = pSeg[i].y2;
|
prect[i].y = pSeg[i].y2;
|
||||||
prect[i].height = pSeg[i].y1 - pSeg[i].y2 + 1;
|
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);
|
pGC->ops->PolyFillRect(pDrawable, pGC, nseg, prect);
|
||||||
xfree(prect);
|
xfree(prect);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue