[SDL] "Perfect" circles
Alan Wolfe
Atrix2 at cox.net
Wed Nov 8 06:26:37 PST 2006
Maybe this doesn't apply any more but I think that it does...someone correct
these statements if they are wrong please
Using the circle equation to draw circles doesn't give a perfect circle, it
gives an ellipse. The reason is because the pixels in your monitor
themselves aren't perfect squares (unless you are on a Macintosh I believe).
So what you need to do is use the ellipse function to reverse the effects of
the monitor being distorted.
Is this archaic information which is no longer true or is it still relevant?
I'm not sure so please someone else help me out :P
-----Original Message-----
From: sdl-bounces+atrix2=cox.net at libsdl.org
[mailto:sdl-bounces+atrix2=cox.net at libsdl.org] On Behalf Of Christoph
Freundl
Sent: Wednesday, November 08, 2006 5:55 AM
To: sdl at libsdl.org
Subject: Re: [SDL] "Perfect" circles
Am Dienstag, 31. Oktober 2006 22:01 schrieb xEsk PiV:
> Somebody knows why this code does not make "perfect" circles? How I
> can improve the precision? I have tested this same code in Delphi
> and works perfectly. Can it be problem of the SDL_Rect? I'm using
> C++.
>
> I have seen some programs done in SDL that make this perfectly!
Can you give some sample code that shows a "non-perfect" circle? When I
tried your routines in a small test program, they worked fine.
Regards, Christoph
--
_ http://wormsofprey.org
*__* __ __ __ __ __ _|_ __ __ ___
(__(__( (__) | ' | ) ) __) (__) | |__) | ' (__/_ (__|
The new and free real-time Worms game | |
_______________________________________________
SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl
More information about the SDL
mailing list