From 0f834b91a4768673833ab4917e87d86c237bb1a6 Mon Sep 17 00:00:00 2001 From: marha Date: Fri, 23 Mar 2012 10:05:55 +0100 Subject: libX11 xserver fontconfig mesa pixman xkbcomp xkeyboard-config git update 23 Mar 2012 --- xorg-server/mi/mipoly.c | 77 +++++++++++++++++++++---------------------------- 1 file changed, 33 insertions(+), 44 deletions(-) (limited to 'xorg-server/mi/mipoly.c') diff --git a/xorg-server/mi/mipoly.c b/xorg-server/mi/mipoly.c index b3e2c2fb1..07d981845 100644 --- a/xorg-server/mi/mipoly.c +++ b/xorg-server/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; ix += 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; ix += (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; ix += (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); } -- cgit v1.2.3