[AD] Subpixel Accurate Circles etc

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Hello everyone,

In preparation for making sub-pixel accurate primitive drawing functions
for OpenGL I decided to make the existing software functions for drawing
circles, ellipses and arcs be sub-pixel accurate (they are far from that
as it stands now, especially the horrendous ellipse() function).

So far I am highly successful in making these routines, but I have run
into an ambiguity that I'd like to resolve before continuing further.

Here's the image illustrating the problem:

http://img216.imageshack.us/img216/8360/circlecomparisonzp0.png

Both circles are drawn from the function call with the radius equalling to
20. The circle on the left is drawn with exactly that radius, while the
circle on the right is drawn with that radius + 0.5. There is a little
green circle drawn at a much higher resolution to signify the actual
mathematical circle. Both circles are subpixel accurate. I was wondering
what the preferred way should be. The circle on the right looks the best
to me, since I am not a fan of the little center pixels that invariably
appear in the circle on the left. Also, the circle on the right looks the
most similar to the original allegro's circle routine.

-SiegeLord


      ____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/