Re: rounded rectangle
Posted: Mon Mar 25, 2013 9:07 am
Here's another function for rounded rects. It's only 18 lines, so if you like shorter functions, here you go.
I noticed Love's (0.8.0) polygon-drawing algorithm seems a little buggy, and this may be affecting some output of the rounded rect function. For example, run the line at the bottom to see an unexpected result.
https://gist.github.com/tylerneylon/5235809
An example of weird polygon drawing (at least in 0.8.0):
love.graphics.polygon('fill', 100, 100, 500, 100, 500, 400, 400, 400, 400, 200, 200, 200)
I noticed Love's (0.8.0) polygon-drawing algorithm seems a little buggy, and this may be affecting some output of the rounded rect function. For example, run the line at the bottom to see an unexpected result.
https://gist.github.com/tylerneylon/5235809
An example of weird polygon drawing (at least in 0.8.0):
love.graphics.polygon('fill', 100, 100, 500, 100, 500, 400, 400, 400, 400, 200, 200, 200)