Has anybody a suggestion for an algorithm which draws a filled circle? It's not OpenGL but SDL2 based. So used can be drawing a point at x,y or drawing a line or drawing a filled rectangle.
Ok, I found a solution but it's absolutely slow:
Code:
procedure fillcircle (xc,yc,radius:integer);var x,y:integer;
begin
for y :=-radius to radius do begin
for x :=-radius to radius do begin
if (x*x+y*y <= radius*radius) then begin
dot (xc+x, yc+y);
end;
end;
end;
end;
If anyone knows a faster one I would appreciate some help.
Bookmarks