I’d have to disagree. Antialiasing is the graphical version of code
optimization: Applying it prematurely is the root of all evil. The
default should be off, with the option to enable it. I don’t want
to have to do extra work just to make my lines not be blurry!>----- Original Message ----
From: Bob Pendleton
Subject: Re: [SDL] Anti-alias lines?
I’ll second what Jeff said.
Bob Pendleton
On Tue, Dec 22, 2009 at 8:23 PM, Jeff Post <j_post at pacbell.net> wrote:
On Tuesday 22 December 2009 18:06, Sam Lantinga wrote:
Hey guys, should lines be anti-aliased by default? Should there be an
option to enable or disable anti-aliased lines?
I’m attaching two images, one using the Bresenham line algorithm with
no anti-aliasing, and one using the Wu anti-aliased line algorithm.
See ya!
My vote: anti-aliased by default with option to disable.
Hey guys, should lines be anti-aliased by default? Should there be an
option to enable or disable anti-aliased lines?
I’m attaching two images, one using the Bresenham line algorithm with
no anti-aliasing, and one using the Wu anti-aliased line algorithm.
For green-on-black vector graphics, the anti-aliased version obviously
looks better. The sample images don’t give me enough information to
draw conclusions about complex scenes with bitmapped backgrounds. I
know that anti-aliased filled polygons can cause all kinds of trouble,
but these problems may not apply to lines.
The non-controversial thing to do would be to make anti-aliasing optional.–
Rainer Deyke - rainerd at eldwood.com
I’d have to disagree. Antialiasing is the graphical version of code
optimization: Applying it prematurely is the root of all evil. The
default should be off, with the option to enable it. I don’t want
to have to do extra work just to make my lines not be blurry!
I’d have to disagree. Antialiasing is the graphical version of code
optimization: Applying it prematurely is the root of all evil. The
default should be off, with the option to enable it. I don’t want
to have to do extra work just to make my lines not be blurry!
Also, another thought. The anti-aliased one looks so nice that in
no time everybody will be clamouring for a full-blown vector
drawing library…
Perhaps we can attempt an informal survey. How many on the list
uses line drawing in a serious app?>> ----- Original Message ----
From: Bob Pendleton
Subject: Re: [SDL] Anti-alias lines?
[snip]
–
Cheers,
Kein-Hong Man (esq.)
Kuala Lumpur, Malaysia
Hey guys, should lines be anti-aliased by default? Should there be an
option to enable or disable anti-aliased lines?
I’m attaching two images, one using the Bresenham line algorithm with
no anti-aliasing, and one using the Wu anti-aliased line algorithm.
I would enable antialiasing by default, with an option to disable it at
runtime. Wu looks nice and is fast, but it has to read the destination
memory which might slow things down, or may not be possible.On Tue, 22 Dec 2009 18:06:56 -0800 Sam Lantinga wrote:
Johannes Kroll wrote:> On Tue, 22 Dec 2009 18:06:56 -0800 Sam Lantinga wrote:
Hey guys, should lines be anti-aliased by default? Should there be an
option to enable or disable anti-aliased lines?
I’m attaching two images, one using the Bresenham line algorithm with
no anti-aliasing, and one using the Wu anti-aliased line algorithm.
I would enable antialiasing by default, with an option to disable it at
runtime. Wu looks nice and is fast, but it has to read the destination
memory which might slow things down, or may not be possible.
I’m not sure, I’d vote for not antialiased, unless the antialiasing is
somehow gamma corrected. Antialiased graphics without gamma correction
doesn’t necessarily look better than non antialiased graphics.
whether it is on or off, i guess the real solution would be to put the
enable/disable AA option in a very evident position, such as a parameter of
SDL_Init (or one of its flag).
VittorioOn Wed, Dec 23, 2009 at 3:49 PM, David Olofson wrote:
On Wednesday 23 December 2009, at 03.06.56, Sam Lantinga < slouken at libsdl.org> wrote:
Hey guys, should lines be anti-aliased by default? Should there be an
option to enable or disable anti-aliased lines?
There should definitely be an option, I think. You may not always want AA -
and not just for performance reasons.
The default should probably match the default for filtered scaling.
–
//David Olofson - Developer, Artist, Open Source Advocate
whether it is on or off, i guess the real solution would be to put the
enable/disable AA option in a very evident position, such as a parameter of
SDL_Init (or one of its flag).
But SDL_Init is usually called only on startup. An extra function would
be better.On Wed, 23 Dec 2009 16:16:38 +0100 “Vittorio G.” <vitto.giova at yahoo.it> wrote:
Well, the standard solution that most people would expect is probably the
usual SDL_Enable*() call or something like that.
Anyway, I don’t think SDL_Init() is the best place. You may want to mix AA and
non-AA lines in an application, and I don’t think there’s any technical reason
to rule that out by design.On Wednesday 23 December 2009, at 16.16.38, “Vittorio G.” <vitto.giova at yahoo.it> wrote:
whether it is on or off, i guess the real solution would be to put the
enable/disable AA option in a very evident position, such as a parameter of
SDL_Init (or one of its flag).
–
//David Olofson - Developer, Artist, Open Source Advocate
well SDL_init was just an example
I agree on the SDL_Enable or adding a parameter to the function that draws
lines
VittorioOn Wed, Dec 23, 2009 at 4:23 PM, David Olofson wrote:
On Wednesday 23 December 2009, at 16.16.38, “Vittorio G.” <vitto.giova at yahoo.it> wrote:
whether it is on or off, i guess the real solution would be to put the
enable/disable AA option in a very evident position, such as a parameter
of
SDL_Init (or one of its flag).
Well, the standard solution that most people would expect is probably the
usual SDL_Enable*() call or something like that.
Anyway, I don’t think SDL_Init() is the best place. You may want to mix AA
and
non-AA lines in an application, and I don’t think there’s any technical
reason
to rule that out by design.
–
//David Olofson - Developer, Artist, Open Source Advocate
And to Sam - libcrtxy’s Wu implementation includes gamma-correction
capabilities. (I didn’t write it, and I forget now if it was
optional, or was always used when using AA lines.)
Just in case you wanted to lift or examine some example code.
It only handles sRGB, if I recall. (And, honestly, I know almost
nothing about gamma correction, so I think I’ve just exhausted any
input I can provide on the subject. )On Wed, Dec 23, 2009 at 04:33:09AM -0500, Gato wrote:
I’m not sure, I’d vote for not antialiased, unless the antialiasing is
somehow gamma corrected. Antialiased graphics without gamma correction
doesn’t necessarily look better than non antialiased graphics.
Why not at the time of drawing? Or have AA vs non-AA line-drawing
functions to call? Or is that cluttering the API up too much? :^/
-bill!On Wed, Dec 23, 2009 at 04:16:38PM +0100, Vittorio G. wrote:
whether it is on or off, i guess the real solution would be to put the
enable/disable AA option in a very evident position, such as a parameter
of SDL_Init (or one of its flag).