Source

love / rounded.love / main.lua

Full commit
function bevelrect(x, y, width, height, radius)
   love.graphics.rectangle(love.draw_fill,
                           x + radius, y,
                           width - 2 * radius, height)
   love.graphics.rectangle(love.draw_fill,
                           x, y + radius,
                           width, height - 2 * radius)
   love.graphics.circle(love.draw_fill,
                        x + radius, y + radius, radius)
   love.graphics.circle(love.draw_fill,
                        x + width - radius, y + radius, radius)
   love.graphics.circle(love.draw_fill,
                        x + radius, y + height - radius, radius)
   love.graphics.circle(love.draw_fill,
                        x + width - radius, y + height - radius, radius)
end

function load()
   love.graphics.setBackgroundColor(love.graphics.newColor(0, 255, 255))
   love.graphics.setColor(love.graphics.newColor(255, 0, 255))
end

function update(dt)
end

function draw()
   bevelrect(100, 100, 200, 200, 50)
end