I'm trying to make a simple drawing app in c++, but i'm having trouble finding a function that fills an ellipse, all i have found is FillRect, could someone lead me in the right direction? Thanks
+3
A:
See Ellipse:
The Ellipse function draws an ellipse. The center of the ellipse is the center of the specified bounding rectangle. The ellipse is outlined by using the current pen and is filled by using the current brush.
Filip Navara
2009-09-06 14:50:15
A:
Ellipse function draws an ellipse with given co-ordinates of bounding rectangle. First draw ellipse using given bounding rectangle the move all four vertices of the rectangle towards the center of rectangle by a fix distance ( which depends on how accurately you want to fill) and draw ellipse again. Repeat this step until you reach at center of eclipse.
GG
2009-09-06 15:19:43
why a downvote??
GG
2009-09-06 15:52:59
It wasn't me, but you were possibly downvoted because your answer is inefficient, and may not fill every single pixel. A comment should have accompanied the downvote in my opinion. (Incidentally, it's ellipse, not eclipse - i've done it before, strangely an easy mistake to make!)
Steve Folly
2009-09-06 16:05:41
Thanks Steve, Then after drawing ellipse we can use flood fill.
GG
2009-09-06 16:23:59
No separate flood fill necessary - as Filip said, the current pen is used to draw the outline of the ellipse, and the current brush is used to fill the ellipse, all within one Ellipse(...) call.
Steve Folly
2009-09-07 07:20:26