FMQ74DP324YKGBSTNMHBJMT6FYP5NI26MM43VUPGKODI5DVDCUXQC
elseif lines.current.pending.mode == 'circle' then
local mx,my = coord(x-16), coord(y-lines.current.y)
if mx >= 0 and mx < 256 and my >= 0 and my < lines.current.h then
local center = lines.current.points[lines.current.pending.center]
lines.current.pending.radius = math.dist(center.x,center.y, mx,my)
table.insert(lines.current.shapes, lines.current.pending)
end
elseif shape.mode == 'circle' then
local center = drawing.points[shape.center]
local mx,my = coord(love.mouse.getX()-16), coord(love.mouse.getY()-drawing.y)
if mx < 0 or mx >= 256 or my < 0 or my >= drawing.h then
return
end
local cx,cy = pixels(center.x)+left, pixels(center.y)+top
love.graphics.circle('line', cx,cy, math.dist(cx,cy, love.mouse.getX(),love.mouse.getY()))
function math.dist(x1,y1, x2,y2) return ((x2-x1)^2+(y2-y1)^2)^0.5 end