curved line in SDL
Moderator: Coders of Rage
curved line in SDL
is it possible to make a curved line is SDL?
- epicasian
- Chaos Rift Junior
- Posts: 232
- Joined: Mon Feb 22, 2010 10:32 pm
- Current Project: Gigazilla Engine
- Favorite Gaming Platforms: Dreamcast, SNES, PS2, PC
- Programming Language of Choice: C/++
- Location: WoFo, KY
Re: curved line in SDL
Do you mean, like in an image?
If yes, all you have to do is setup SDL, and display the image of a curved line.
If no, please explain.
Hope it helps,
EpicAsian
If yes, all you have to do is setup SDL, and display the image of a curved line.
If no, please explain.
Hope it helps,
EpicAsian
- Bakkon
- Chaos Rift Junior
- Posts: 384
- Joined: Wed May 20, 2009 2:38 pm
- Programming Language of Choice: C++
- Location: Indiana
Re: curved line in SDL
SDL by itself isn't capable of drawing primitives, but SDL_gfx is a library extension that includes arcs and bezier curves.
http://www.ferzkopp.net/joomla/content/view/19/14/
http://www.ferzkopp.net/joomla/content/view/19/14/
-
- Chaos Rift Cool Newbie
- Posts: 85
- Joined: Wed Mar 17, 2010 4:32 pm
Re: curved line in SDL
If you want, you can make a function that draws a curved line in the pixel frame buffer yourself, using some math. But i guess there are some libraries on the internet that does these things for you.