System.Types.IntersectRect
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 */;
Propriétés
| Type | Visibilité | Source | Unité | Parent |
|---|---|---|---|---|
| function | public | System.Types.pas System.Types.hpp |
System.Types | System.Types |
Description
Renvoie l'intersection de deux rectangles
Appelez IntersectRect pour obtenir le rectangle à l'intersection de R1 et R2. L'intersection est renvoyée dans le paramètre Rect.
IntersectRect renvoie True si l'intersection des deux rectangles n'est pas vide. Si R1 et R2 ne se chevauchent pas, IntersectRect renvoie False, et un rectangle est affecté au paramètre Rect à la position (0,0) avec 0 Width et 0 Height.