I want to draw a filled in circle that in the center is white and fades to light blue and then fades to dark blue by the outer edge of the circle.

I have an algorithm to draw a circle.....but I need some type of algorithm to fill a circle, especially the way I want to do it...and a circle filling algo is not near as easy as a rectangle filling algo....

so anybody know of any?

06-07-2002

ygfperson

use for loops to test each possible bit to fill; all bits inside the circle, or maybe for simplicity's sake, in a rectangle which circumscribes your circle. find its distance from the center, and use that as a multiplier in your color code calculation. (smaller distance = brighter colors). if a point isn't inside the circle, don't plot any pixel.

note: this may be slow. there might be a better way to do it.

06-07-2002

golfinguy4

Could you just use your circle drawing algorithm and from the center, draw bigger and bigger circles? As the number of circles increases, you can increment/decrement one of the RGB values. Not too sure how well this will work either.

06-07-2002

DavidP

you would think that....but that can leave out some pixels if you think about it....because it doesnt draw a perfect circle

06-08-2002

vasanth

yea i agree with that,, I tried doing that.. But betwween each circle there are very small gaps(4 gaps).. On each corner..... And dosent look good.. But i think there are functions like fill etc etc.. So check them out