I tried to make a temporary filled circle function until the next version of LuaZM comes out, but all it does is draws a box. Could someone help me out?
Code:
Algorithm shamelessly stolen from _player1537
Code:
local function drawCircleFill(centerx, centery, radius, color)
f = 1 - radius
ddF_x = 1
ddF_y = -2 * radius
x = 0
y = radius
drawLine(centerx, centery + radius, centerx, centery - radius, color)
drawLine(centerx + radius, centery, centerx - radius, centery, color)
while x < y do
if f >= 0 then
y = y - 1
ddF_y = ddF_y + 2
f = f + ddF_y
end
x = x + 1
ddF_x = ddF_x + 2
drawLine(centerx + x, centery + y, centerx - x, centery + y, color)
drawLine(centerx + x, centery - y, centerx - x, centery - y, color)
drawLine(centerx + y, centery + x, centerx - y, centery + x, color)
drawLine(centerx + y, centery - x, centerx - y, centery - x, color)
end
end
Algorithm shamelessly stolen from _player1537