summaryrefslogtreecommitdiff
path: root/xc/programs/Xserver/mi/miwideline.c
diff options
context:
space:
mode:
authorkeith <empty>1991-07-03 15:44:04 +0000
committerkeith <empty>1991-07-03 15:44:04 +0000
commite1f4bb005e5ddeee5f43c0b9ffd438fecf2ee3ac (patch)
tree91e8e1baededd042ea2b20e3a38bfa3bd92e6212 /xc/programs/Xserver/mi/miwideline.c
parent64de471dd949f0d855a849eb7f4a20519528f0ab (diff)
make 1-point poly lines generate double caps (like other coincident lines)
Diffstat (limited to 'xc/programs/Xserver/mi/miwideline.c')
-rw-r--r--xc/programs/Xserver/mi/miwideline.c46
1 files changed, 23 insertions, 23 deletions
diff --git a/xc/programs/Xserver/mi/miwideline.c b/xc/programs/Xserver/mi/miwideline.c
index 312a2fbf3..1faa69047 100644
--- a/xc/programs/Xserver/mi/miwideline.c
+++ b/xc/programs/Xserver/mi/miwideline.c
@@ -1,5 +1,5 @@
/*
- * $XConsortium: miwideline.c,v 1.38 91/07/01 17:02:36 keith Exp $
+ * $XConsortium: miwideline.c,v 1.39 91/07/02 13:11:03 rws Exp $
*
* Copyright 1988 Massachusetts Institute of Technology
*
@@ -1454,36 +1454,36 @@ miWideLine (pDrawable, pGC, mode, npt, pPts)
Bool somethingDrawn = FALSE;
Bool selfJoin;
- if (npt <= 1)
- return;
-
spanData = miSetupSpanData (pGC, &spanDataRec, npt);
pixel = pGC->fgPixel;
x2 = pPts->x;
y2 = pPts->y;
first = TRUE;
selfJoin = FALSE;
- if (mode == CoordModePrevious)
+ if (npt > 1)
{
- int nptTmp;
- DDXPointPtr pPtsTmp;
-
- x1 = x2;
- y1 = y2;
- nptTmp = npt;
- pPtsTmp = pPts + 1;
- while (--nptTmp)
- {
- x1 += pPtsTmp->x;
- y1 += pPtsTmp->y;
- ++pPtsTmp;
- }
- if (x2 == x1 && y2 == y1)
+ if (mode == CoordModePrevious)
+ {
+ int nptTmp;
+ DDXPointPtr pPtsTmp;
+
+ x1 = x2;
+ y1 = y2;
+ nptTmp = npt;
+ pPtsTmp = pPts + 1;
+ while (--nptTmp)
+ {
+ x1 += pPtsTmp->x;
+ y1 += pPtsTmp->y;
+ ++pPtsTmp;
+ }
+ if (x2 == x1 && y2 == y1)
+ selfJoin = TRUE;
+ }
+ else if (x2 == pPts[npt-1].x && y2 == pPts[npt-1].y)
+ {
selfJoin = TRUE;
- }
- else if (x2 == pPts[npt-1].x && y2 == pPts[npt-1].y)
- {
- selfJoin = TRUE;
+ }
}
projectLeft = pGC->capStyle == CapProjecting && !selfJoin;
projectRight = FALSE;