summaryrefslogtreecommitdiff
path: root/xserver/mi/mizerline.c
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2015-09-16 19:10:27 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2015-09-16 19:10:27 +0000
commit4f2941d7bdfb60a6b2ca49d7e2ee50dd5eb11ddd (patch)
tree5f7f0cf3d5aeb655a950fae516224a3d61a820cf /xserver/mi/mizerline.c
parentc84734bf28ef1ec0ce3cc7d1c45dfb920484e68e (diff)
Update to xserver 1.17.2. tested by dcoppa@, jsg@, jasper@ & naddy@
Diffstat (limited to 'xserver/mi/mizerline.c')
-rw-r--r--xserver/mi/mizerline.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/xserver/mi/mizerline.c b/xserver/mi/mizerline.c
index 90798dbdf..5a2447014 100644
--- a/xserver/mi/mizerline.c
+++ b/xserver/mi/mizerline.c
@@ -26,13 +26,13 @@ Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
+both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
+software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
@@ -179,14 +179,6 @@ miZeroLine(DrawablePtr pDraw, GCPtr pGC, int mode, /* Origin or Previous */
MIOUTCODES(oc2, x2, y2, xleft, ytop, xright, ybottom);
while (--npt > 0) {
- if (Nspans > 0)
- (*pGC->ops->FillSpans) (pDraw, pGC, Nspans, pspanInit,
- pwidthInit, FALSE);
- Nspans = 0;
- new_span = TRUE;
- spans = pspanInit - 1;
- widths = pwidthInit - 1;
-
x1 = x2;
y1 = y2;
oc1 = oc2;
@@ -208,6 +200,14 @@ miZeroLine(DrawablePtr pDraw, GCPtr pGC, int mode, /* Origin or Previous */
CalcLineDeltas(x1, y1, x2, y2, adx, ady, signdx, signdy, 1, 1, octant);
+ if (ady + 1 > (list_len - Nspans)) {
+ (*pGC->ops->FillSpans) (pDraw, pGC, Nspans, pspanInit,
+ pwidthInit, FALSE);
+ Nspans = 0;
+ spans = pspanInit - 1;
+ widths = pwidthInit - 1;
+ }
+ new_span = TRUE;
if (adx > ady) {
e1 = ady << 1;
e2 = e1 - (adx << 1);
@@ -235,7 +235,7 @@ miZeroLine(DrawablePtr pDraw, GCPtr pGC, int mode, /* Origin or Previous */
length = abs(new_x2 - new_x1);
/* if we've clipped the endpoint, always draw the full length
- * of the segment, because then the capstyle doesn't matter
+ * of the segment, because then the capstyle doesn't matter
*/
if (pt2_clipped)
length++;
@@ -295,7 +295,7 @@ miZeroLine(DrawablePtr pDraw, GCPtr pGC, int mode, /* Origin or Previous */
length = abs(new_y2 - new_y1);
/* if we've clipped the endpoint, always draw the full length
- * of the segment, because then the capstyle doesn't matter
+ * of the segment, because then the capstyle doesn't matter
*/
if (pt2_clipped)
length++;