summaryrefslogtreecommitdiff
path: root/xserver/mi/mipoly.c
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2012-06-10 13:21:33 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2012-06-10 13:21:33 +0000
commit171e929a08098b6c844887adc43879c7579dc15f (patch)
tree6b4d2e3bc20dbd4dc9a1f031416e66614c53dd21 /xserver/mi/mipoly.c
parent68781b09de2c95b87ea898c4ecf3018dfb4460d2 (diff)
Update to xserver 1.12.2. tested by naddy@, krw@, mpi@.
Diffstat (limited to 'xserver/mi/mipoly.c')
-rw-r--r--xserver/mi/mipoly.c77
1 files changed, 33 insertions, 44 deletions
diff --git a/xserver/mi/mipoly.c b/xserver/mi/mipoly.c
index b3e2c2fb1..07d981845 100644
--- a/xserver/mi/mipoly.c
+++ b/xserver/mi/mipoly.c
@@ -22,7 +22,6 @@ Except as contained in this notice, the name of The Open Group shall not be
used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
-
Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
@@ -65,60 +64,50 @@ SOFTWARE.
#include "mi.h"
#include "regionstr.h"
-
void
-miFillPolygon( DrawablePtr dst, GCPtr pgc,
- int shape, int mode,
- int count, DDXPointPtr pPts)
+miFillPolygon(DrawablePtr dst, GCPtr pgc,
+ int shape, int mode, int count, DDXPointPtr pPts)
{
- int i;
- int xorg, yorg;
- DDXPointPtr ppt;
+ int i;
+ int xorg, yorg;
+ DDXPointPtr ppt;
if (count == 0)
- return;
+ return;
ppt = pPts;
- if (pgc->miTranslate)
- {
- xorg = dst->x;
- yorg = dst->y;
-
- if (mode == CoordModeOrigin)
- {
- for (i = 0; i<count; i++)
- {
- ppt->x += xorg;
- ppt++->y += yorg;
- }
+ if (pgc->miTranslate) {
+ xorg = dst->x;
+ yorg = dst->y;
+
+ if (mode == CoordModeOrigin) {
+ for (i = 0; i < count; i++) {
+ ppt->x += xorg;
+ ppt++->y += yorg;
+ }
}
- else
- {
- ppt->x += xorg;
- ppt++->y += yorg;
- for (i = 1; i<count; i++)
- {
- ppt->x += (ppt-1)->x;
- ppt->y += (ppt-1)->y;
- ppt++;
- }
+ else {
+ ppt->x += xorg;
+ ppt++->y += yorg;
+ for (i = 1; i < count; i++) {
+ ppt->x += (ppt - 1)->x;
+ ppt->y += (ppt - 1)->y;
+ ppt++;
+ }
}
}
- else
- {
- if (mode == CoordModePrevious)
- {
- ppt++;
- for (i = 1; i<count; i++)
- {
- ppt->x += (ppt-1)->x;
- ppt->y += (ppt-1)->y;
- ppt++;
- }
+ else {
+ if (mode == CoordModePrevious) {
+ ppt++;
+ for (i = 1; i < count; i++) {
+ ppt->x += (ppt - 1)->x;
+ ppt->y += (ppt - 1)->y;
+ ppt++;
+ }
}
}
if (shape == Convex)
- miFillConvexPoly(dst, pgc, count, pPts);
+ miFillConvexPoly(dst, pgc, count, pPts);
else
- miFillGeneralPoly(dst, pgc, count, pPts);
+ miFillGeneralPoly(dst, pgc, count, pPts);
}