Sdl_gfx line thickness

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…

Anyway pointers appreciated…

regards,
till

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…

Anyway pointers appreciated…

regards,
till


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

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…

thanks anyway -

cheers till
-------------- next part --------------
A non-text attachment was scrubbed…
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3166 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20040805/51bfa6b3/attachment.bin

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…

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:

You can just draw two lines right next to each other, I guess this is
probably very inefficient, but it works and is easy.

ok cool another tip - I still wonder how others do it…
And is there a way to influence the amount of antialiasing?

cheers till