System.Types.IntersectRect

提供: RAD Studio API Documentation
移動先: 案内検索

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 */;

プロパティ

種類 可視性 ソース ユニット
function public
System.Types.pas
System.Types.hpp
System.Types System.Types


説明

2 つの指定された四角形が交差する部分を返します。

IntersectRect は、2 つの指定された四角形の交差部分の四角形を返します。

R1R2Rect の 3 つのパラメータを伴う IntersectRect は、指定された 2 つの四角形 R1R2 の交差部分である四角形を返します。 交差部分は、Rect パラメータで返されます。 UnionRectF は、2 つの四角形による交差部分が空でなかったときに True を返します。R1R2 が重なってなかった場合、IntersectRectFalse を返し、Rect は、(0,0) の位置にある幅 0 高さ 0 の四角形に設定されます。

ARect1ARect2 の 2 つのパラメータを伴う IntersectRect は、指定された 2 つの四角形 ARect1ARect2 の交差部分である四角形を返します。

関連項目

コード サンプル