System.Types.IntersectRect

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function IntersectRect(const Rect1, Rect2: TRect): Boolean;
function IntersectRect(out Rect: TRect; const R1, R2: TRect): Boolean;
function IntersectRect(const Rect1, Rect2: TRectF): Boolean;
function IntersectRect(out Rect: TRectF; const R1, R2: TRectF): Boolean;

C++

extern DELPHI_PACKAGE bool __fastcall IntersectRect(const TRect &Rect1, const TRect &Rect2)/* overload */;

Properties

Type Visibility Source Unit Parent
function public
System.Types.pas
System.Types.hpp
System.Types System.Types

Description

Returns the intersection of two specified rectangles.

IntersectRect returns the rectangle that is the intersection of two specified rectangles.

IntersectRect, with three R1, R2, and Rect parameters, returns the rectangle, that is the intersection of two specified R1 and R2 rectangles. The intersection is returned in the Rect parameter. UnionRectF returns True if the two rectangles have a nonempty intersection. If R1 and R2 do not overlap, IntersectRect returns False, and Rect is set to a rectangle at the (0,0) position with 0 Width and 0 Height.

IntersectRect, with two ARect1 and ARect2 parameters, returns the rectangle, that is intersection of two specified ARect1 and ARect2 rectangles.

See Also

Code Examples