mirror of
https://git.sr.ht/~rabbits/macintosh_cookbook
synced 2024-12-28 01:29:49 +00:00
25 lines
406 B
ObjectPascal
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.
|