pascalabcnet/InstallerSamples/Graphics/GraphABCLinux/rain.pas
Mikhalkovich Stanislav 6e34bc00fa TeacherControlPlugin в проекте
GraphABCLinux
Поправил иконку PABCHealth
Изменения в LightPT.pas
Цветной вывод в окне вывода (только для Windows)
Console.OutputEncoding := new System.Text.UTF8Encoding(false); в __RedirectIOMode.pas чтобы в Linux нормально выводилось
2022-07-10 14:51:51 +03:00

28 lines
546 B
ObjectPascal

// Имитация кругов на воде от капель дождя
uses GraphABCLinux;
const speed = 2;
procedure Kaplia(x0,y0: integer);
begin
var r := 1;
for var i:=0 to 63 do
begin
Pen.Color := RGB(i*4,i*4,i*4);
Circle(x0,y0,r);
if i mod speed = 0 then Sleep(10);
Pen.Color := clWhite;
Circle(x0,y0,r);
r += 2;
end;
end;
const z=50;
begin
Window.Title := 'Капли дождя';
SetWindowSize(800,600);
while True do
Kaplia(Random(z,WindowWidth-z),Random(z,WindowHeight-z));
end.