Difference between revisions of "TPAChain"

From SCAR Divi Manual
Jump to: navigation, search
(Description)
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
==Definition==
+
#REDIRECT [[SplitTPA]]
<source lang="scar" lines="false">
 
function TPAChain(const TPA: TPointArray; const Dist: Integer): T2DPointArray;
 
</source>
 
  
==Availability==
+
[[Category:Deprecated Functions]]
SCAR Divi 3.26 > Current
 
 
 
==Description==
 
This function splits a given [[TPointArray]] '''TPA''' into separated TPointArrays by grouping together the points that are within a given distance from each other. The function returns a [[T2DPointArray]] containing all the resulting TPointArrays.
 
 
 
==Example==
 
<source lang="scar">
 
var
 
  i: Integer;
 
  TPA: TPointArray;
 
  ATPA: T2DPointArray;
 
 
 
begin
 
  TPA := [Point(0, 0), Point(2, 6), Point(1, 2), Point(1, 1)];
 
  ATPA := TPAChain(TPA, 2);
 
  for i := Low(ATPA) to High(ATPA) do
 
    WriteLn(TPAToStr(ATPA[i]));
 
end.
 
</source>
 
 
 
Output:
 
(0,0);(1,1);(1,2)
 
(2,6)
 
 
 
==See Also==
 
*[[TPAChainEx]]
 
*[[TPAGroup]]
 
*[[TPAGroupEx]]
 
 
 
[[Category:Functions]]
 
[[Category:TPA Functions]]
 
[[Category:Array Functions]]
 

Latest revision as of 19:09, 20 October 2011

Redirect to: