Difference between revisions of "TPAIntersect"

From SCAR Divi Manual
Jump to: navigation, search
(Created page with "==Definition== <source lang="scar" lines="false"> function TPAIntersect(const TPA1, TPA2: TPointArray): TPointArray; </source> ==Availability== SCAR Divi 3.26 > Current ==Descr...")
 
Line 18: Line 18:
 
   TPA := TPAIntersect([Point(0, 0), Point(1, 0), Point(0, 1), Point(1, 1), Point(2, 2)],
 
   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)]);
 
     [Point(1, 0), Point(2, 0), Point(2, 2)]);
   WriteLn('TPointArray[' + TPAToStr(TPA) + ']');
+
   WriteLn(TPAToStr(TPA));
 
end.
 
end.
 
</source>
 
</source>
  
 
Output:
 
Output:
  TPointArray[(1,0);(2,2)]
+
  (1,0);(2,2)
  
 
==See Also==
 
==See Also==

Revision as of 11:29, 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