Path: utzoo!utgpu!attcan!uunet!mcvax!unido!sinix!claus
From: claus@sinix.UUCP (Claus Gittinger)
Newsgroups: comp.windows.x
Subject: X11R2 bug filling arcs with pie-mode
Keywords: server bug arc
Message-ID: <489@athen.sinix.UUCP>
Date: 20 Sep 88 18:26:19 GMT
Organization: Siemens AG, K D ST SP4, Munich
Lines: 33

this bug appeared on Siemens Mx300/X9733 and on uVax running X11R2;
am I alone with it or do you notice the same behavior ?

VERSION:
	X11R2

SYNOPSIS:
	filling arcs with XFillArc(s) and arc_mode==ARCPIESLICE
	produces funny results when angle2 is > 180 degrees.

REPEAT-BY:
	XFillArc(dpy, mainWindow, gc, x, y, w, h, 135*64, 250*64);

FIX:
	(has only been tested on Siemens machines)
	after computing the points for the polygon,
	miPolyFillArc passes them to FillPolygon, with Convex shape.
	The Pie is only Convex, if angle2 <= 180 degrees.

		    ....
	pPts[0].y = parcs[i].y + parcs[i].height/2;
	if (parcs[i].angle2 < (FULLCIRCLE/2))
	    (*pGC->FillPolygon)(pDraw, pGC, Convex,
				CoordModeOrigin, cpt + 1, pPts);
	else
	    (*pGC->FillPolygon)(pDraw, pGC, Nonconvex,
				CoordModeOrigin, cpt + 1, pPts);
		    ....

	by the way: shouldn't we move the Xfree out of the if statement ?


	improvement, comments welcome -- no flames please !