11-16-2022, 08:34 AM
Good work with drawing primitives :-)
For drawing filled circles, I once implemented it on a gfx library. I used bresenham's circle algorithm, but instead of directly plotting the edge pixels, I used them to fill an array of pairs of left/right edge values for each affected scanline. Then filled each scanline with solid color between its left and right edges and voila, filled circle.
This is very old MS-DOS Borland C source with the base algorithm, but you got the idea.
http://csourcecodes.blogspot.com/2016/06...ation.html
For drawing filled circles, I once implemented it on a gfx library. I used bresenham's circle algorithm, but instead of directly plotting the edge pixels, I used them to fill an array of pairs of left/right edge values for each affected scanline. Then filled each scanline with solid color between its left and right edges and voila, filled circle.
This is very old MS-DOS Borland C source with the base algorithm, but you got the idea.
http://csourcecodes.blogspot.com/2016/06...ation.html