diff --git a/lib/gears/shape.lua b/lib/gears/shape.lua index 17181bf43..371dad534 100644 --- a/lib/gears/shape.lua +++ b/lib/gears/shape.lua @@ -328,9 +328,10 @@ end -- @param cr A cairo context -- @tparam number width The shape width -- @tparam number height The shape height -function module.circle(cr, width, height) - local size = math.min(width, height) / 2 - cr:arc(width / 2, height / 2, size, 0, 2*math.pi) +-- @tparam[opt=math.min(width height) / 2)] number radius The radius +function module.circle(cr, width, height, radius) + radius = radius or math.min(width, height) / 2 + cr:arc(width / 2, height / 2, radius, 0, 2*math.pi) cr:close_path() end