The outcircle function is not returning a "circumscribing circle". Also when scaling a polygon, the size of the circle is not updated.
I think this function is problematic because not all shapes can have a circumscribing circle. Perhaps replace this function with a minimally bounded circle? Maybe even removing it would be a good idea.
shapes = require'hc.shapes'
shape = shapes.newPolygonShape(250,100,550,200,450,200)
shape:scale(2)
shape2 = shapes.newPolygonShape(250,100,550,200,450,200)
function love.draw()
shape:draw('line')
love.graphics.circle('line',shape:outcircle())
shape2:draw('line')
love.graphics.circle('line',shape2:outcircle())
end
You're right, it's not a circumscribing circle, but rather a sort of minimal circle that fully contains the shape. I will fix the documentation to avoid further confusion.
The outcircle function is not returning a "circumscribing circle". Also when scaling a polygon, the size of the circle is not updated.
I think this function is problematic because not all shapes can have a circumscribing circle. Perhaps replace this function with a minimally bounded circle? Maybe even removing it would be a good idea.