I was wondering how you would go about hacking support for antialiased lines
that have a thickness > 1 Pixel into sdl_gfx. How do you produce lines
thicker than 1? With polygons? Or is there a primitive library that has
support for it? I took a look at all the libraries available on libsdl.org -
no luck - a few offer antialiasing for lines and other primitives, but no
built in support for a line thickness, not in sdl_gfx, not in SGE, not in
SEL.
So I thought that this might be because it is simple to do with the
available functions, but I didn’t find out how…
In a sense, a thick line is nothing more than a filled rectangle, unless
you want rounded edges on it. You could probably hack out a function
that uses the anti aliased polygon and then fill in the polygon using
other sdl_gfx functions.
Till G. Bay wrote:>Hi all -
I was wondering how you would go about hacking support for antialiased lines
that have a thickness > 1 Pixel into sdl_gfx. How do you produce lines
thicker than 1? With polygons? Or is there a primitive library that has
support for it? I took a look at all the libraries available on libsdl.org -
no luck - a few offer antialiasing for lines and other primitives, but no
built in support for a line thickness, not in sdl_gfx, not in SGE, not in
SEL.
So I thought that this might be because it is simple to do with the
available functions, but I didn’t find out how…
In a sense, a thick line is nothing more than a filled rectangle, unless
you want rounded edges on it. You could probably hack out a function
that uses the anti aliased polygon and then fill in the polygon using
other sdl_gfx functions.
That’s what I suspected - but I was wondering if somebody had already done
that…
I was wondering how you would go about hacking support for antialiased lines
that have a thickness > 1 Pixel into sdl_gfx. How do you produce lines
thicker than 1? With polygons? Or is there a primitive library that has
support for it? I took a look at all the libraries available on libsdl.org -
no luck - a few offer antialiasing for lines and other primitives, but no
built in support for a line thickness, not in sdl_gfx, not in SGE, not in
SEL.
So I thought that this might be because it is simple to do with the
available functions, but I didn’t find out how…
Anyway pointers appreciated…
You can just draw two lines right next to each other, I guess this is
probably very inefficient, but it works and is easy.
JamesOn Thu, 05 Aug 2004 09:19:16 +0200, Till G. Bay wrote: