[A89] filling ellipses


[Prev][Next][Index][Thread]

[A89] filling ellipses




Does anyone know a good fast way to fill an ellipse (using not only black and white, but xor)? 
There is a draw ellipse function, but nothing for filling it.  A for loop decrementing the radius
by one doesn't work; it leaves out a few pixels.  You can't use a decimal radius, which might
work.  I was thinking along the lines of either calculating horizontal points on the circle then
connecting them with a line or doing a pixel test thing, sweeping across, filling once it detects
the edge of the circle.  The problem is, I'm not sure if this could be efficient if you're drawing
onto a background.  Another idea was to create an array when you begin that symbolizes the
rectangle around the ellipse, then use ones and zeros to create the filled circle, basically as a
sprite in a different form, then copy it to the screen pixel by pixel.  I'm not sure that any of
these will be very fast, though.

Thanks,
jeff

__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/



Follow-Ups: