Advertisement
WarPie90

Barrows rooms - test 1

May 27th, 2023 (edited)
1,397
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Delphi 0.44 KB | None | 0 0
  1. var
  2.   tpa,room,other,approx: TPointArray;
  3.   ATPA: T2DPointArray;
  4.   m: TMufasaBitmap;
  5. begin
  6.   srl.FindColors(tpa, CTS2(1776416, 2, 0.2, 0.2), [52,117,553,450]);
  7.   tpa := tpa.Grow(10);
  8.   tpa := tpa.Invert();
  9.   approx := tpa.Erode(40).Grow(40);
  10.  
  11.   room := tpa.PointsInRangeOf(approx, 0, 20);
  12.   other := ClearTPAFromTPA(TPA, room);
  13.   ATPA := other.Cluster(2) + room;
  14.  
  15.   m.Init();
  16.   m.FromClient();
  17.   m.DrawATPA(ATPA);
  18.  
  19.   m.Debug();
  20. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement