Difference between revisions of "TPAIntersect"

From SCAR Divi Manual
Jump to: navigation, search
 
Line 8: Line 8:
  
 
==Description==
 
==Description==
Returns a [[TPointArray]] containing all points the given TPointArrays '''TPA1''' and '''TPA2''' have in common.
+
Returns a [[TPointArray]] containing all [[TPoint|points]] the given TPointArrays '''TPA1''' and '''TPA2''' have in common.
  
 
==Example==
 
==Example==

Latest revision as of 20:22, 24 October 2011

Definition

function TPAIntersect(const TPA1, TPA2: TPointArray): TPointArray;

Availability

SCAR Divi 3.26 > Current

Description

Returns a TPointArray containing all points the given TPointArrays TPA1 and TPA2 have in common.

Example

var
  TPA: TPointArray;

begin
  TPA := TPAIntersect([Point(0, 0), Point(1, 0), Point(0, 1), Point(1, 1), Point(2, 2)],
    [Point(1, 0), Point(2, 0), Point(2, 2)]);
  WriteLn(TPAToStr(TPA));
end.

Output:

(1,0);(2,2)

See Also