Difference between revisions of "TPAChainEx"

From SCAR Divi Manual
Jump to: navigation, search
(Created page with "==Definition== <source lang="scar" lines="false"> function TPAChain(const TPA: TPointArray; const XMax, YMax: Integer): T2DPointArray; </source> ==Availability== SCAR Divi 3.26 ...")
 
(Redirected page to SplitTPAEx)
Line 1: Line 1:
==Definition==
+
#REDIRECT [[SplitTPAEx]]
<source lang="scar" lines="false">
 
function TPAChain(const TPA: TPointArray; const XMax, YMax: Integer): T2DPointArray;
 
</source>
 
 
 
==Availability==
 
SCAR Divi 3.26 > Current
 
 
 
==Description==
 
This function chains all [[TPoint|TPoints]] that are within a certain distance from each other together into individual [[TPointArray|TPointArrays]]. The distance is given separately for the x and y components of the points.
 
 
 
==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 := TPAChainEx(TPA, 0, 1);
 
  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==
 
*[[TPAChain]]
 
*[[TPAGroup]]
 
*[[TPAGroupEx]]
 
  
 
[[Category:Functions]]
 
[[Category:Functions]]
 
[[Category:TPA Functions]]
 
[[Category:TPA Functions]]
 
[[Category:Array Functions]]
 
[[Category:Array Functions]]

Revision as of 02:31, 10 September 2011

Redirect to: