macintosh_cookbook/examples/circlefill.pas
2020-05-07 18:47:11 +09:00

25 lines
406 B
ObjectPascal

program ExampleCircleFill;
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
Moveto(xc + x, yc + y);
Lineto(xc + x, yc + y);
end;
end;
end;
end;
begin
ShowDrawing;
Fillcircle(60, 60, 40);
end.