This repository has been archived on 2024-12-25. You can view files and clone it, but cannot push or open issues or pull requests.
OldPascalProjects/Graphics/WPFObjects/gr_IntersectWPF.pas
2024-03-10 20:32:51 +03:00

25 lines
661 B
ObjectPascal

uses WPFObjects;
var Destroyer: CircleWPF;
procedure CheckPulyaIntersects;
begin
Destroyer.IntersectionList.ForEach(procedure(o)->o.Destroy);
end;
begin
Window.SetSize(640,480);
Window.Title := 'Разрушитель: метод Intersect пересечения объектов';
loop 500 do
new RectangleWPF(Random(Window.Width.Round-200)+100,Random(Window.Height.Round-100),Random(200),Random(200),clRandom);
Destroyer := new CircleWPF(10,Window.Height / 2,100,Colors.Black);
Destroyer.SetText('Destroyer',30,'Arial',Colors.Yellow);
loop 900 do
begin
Destroyer.MoveBy(1,0);
CheckPulyaIntersects;
Sleep(1);
end;
end.