Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!cs.utexas.edu!ginosko!usc!bloom-beacon!eru!luth!sunic!tut!hydra!hylka!teittinen From: TEITTINEN@cc.helsinki.fi (Marko) Newsgroups: comp.graphics Subject: Re: Filled Arc Message-ID: <933@cc.helsinki.fi> Date: 14 Oct 89 13:05:27 GMT References: <3002@ndsuvax.UUCP> Distribution: comp.graphics Lines: 23 In article <3002@ndsuvax.UUCP>, nebakke@ndsuvax.UUCP (Jeff Bakke) writes: > I've been keeping watch on this group for sometime and although I've seend > requests for circle/ellipse/arc functions, I was wondering if anyone had > an algorithm/source/pseudo-code for a filled-arc function. I am currently > using a filled arc function which simply draws a line from the center point > to each point on the curve. The problem with this is that in a large > arc, you end up with some gaps inside the arc. I alleviate this problem > with a line function that draws a line 3 pixels wide instead of just one > but unfortunately this function is horrendously slow. > > Is there a better method for filling an arc or should I just make an > effort and improve on the wide line function? It seems to me that > there would be a better way to do this but I haven't the faintest idea > how. Howabout just drawing an arc with the ends connected to the centerpoint and then filling the "wedge" with a floodfill algorithm. Of course this works only on a bitmap device. -- EARN: teittinen@finuh ! "Studying is the only way Internet: teittinen@cc.helsinki.fi ! to do nothing without Marko Teittinen, student of computer science ! anyone blaming you" -me