Is there a function to get rid of the common points in two TPA's? I know hwo to combine two, but I want to remove all the common points first. I have no idea what I could do/;
Is there a function to get rid of the common points in two TPA's? I know hwo to combine two, but I want to remove all the common points first. I have no idea what I could do/;
These any of use?
Simba Code:function FindTPInTPARange(TPA: TPointArray; TP: TPoint; Range: Integer): Boolean;
var I: Integer;
begin
for I := 0 to High(TPA) do begin
if (PointInBox(TP, IntToBox(TPA[I].x - Range, TPA[I].y - Range, TPA[I].x + Range, TPA[I].y + Range))) then begin
Result := True;
exit;
end;
end;
Result := False;
end;
function RemoveDuplicateDTMs(FoundPositions: TPointArray): TPointArray;
var I: Integer;
begin
SetArrayLength(Result, 1);
for I := 0 to High(FoundPositions) do begin
if (not FindTPInTPARange(Result, FoundPositions[I], 25)) then begin
Result[High(Result)] := FoundPositions[I];
SetArrayLength(Result, (High(Result) + 1) + 1);
end;
end;
SetArrayLength(Result, High(Result));
end;
There used to be something meaningful here.
There are currently 1 users browsing this thread. (0 members and 1 guests)