1
0
mirror of https://git.sr.ht/~rabbits/macintosh_cookbook synced 2025-01-29 11:30:49 +00:00

25 lines
406 B
ObjectPascal
Raw Normal View History

2020-05-07 18:47:11 +09:00
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.