How about an SDL_RenderFillQuad function?

"SeanOConnor" <[email protected]>
Newsgroups gmane.comp.lib.sdl
Message-ID <[email protected]>
I need to draw a graph in my game but it looks like the SDL_RenderDrawLine only draws lines 1 pixel wide. With a bit of maths I can work out the 4 points needed to draw a line of any width but the only SDL function that draws a primitive seems to be:

SDL_RenderFillRect

which only draws rectangles with no rotation.

I'm guessing this SDL function just draws two triangles to make this rectangle based on the SDL_Rect it's sent, so surely it'd be trivial to create a new function SDL_RenderFillQuad that accepts four SDL_Points and draws two triangles based on that?

And maybe an SDL_RenderFillTriangle too that takes three SDL_Points?

_______________________________________________
SDL mailing list
[email protected]
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.