[SDL] triangles & aspects

speartip clangray at fastmail.com
Thu Mar 23 14:19:54 PDT 2017


Hi,

I am endeavoring to put some simple triangles in my screen. The SDL wiki gives an example of - yes - connecting 3 drawlines. Am I overlooking something or do these lines have to be arrived at mathematically or hardcoded to know what anchoring coordinates they must belong to form the triangle. I don't see a function to make the triangle for you. This becomes rather labor intensive to create your triangle. Also once made, if your aspect ratio changes the lines of the triangle will have to be recalculated to maintain the equality of the angles. I can make a function to correct, no prob.

Before venturing out on some crazy triangle project, just wanted to know whether I was missing some piece of info.




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20170323/a07a6657/attachment.htm>


More information about the SDL mailing list