AnalysisRegion.IntersectsWith 方法
判斷 AnalysisRegion 的區域是否與指定的矩形交集。
命名空間: System.Windows.Ink
組件: IAWinFX (在 IAWinFX.dll 中)
語法
'宣告
Public Function IntersectsWith ( _
rectangle As Rect _
) As Boolean
'用途
Dim instance As AnalysisRegion
Dim rectangle As Rect
Dim returnValue As Boolean
returnValue = instance.IntersectsWith(rectangle)
public bool IntersectsWith(
Rect rectangle
)
public:
bool IntersectsWith(
Rect rectangle
)
public boolean IntersectsWith(
Rect rectangle
)
public function IntersectsWith(
rectangle : Rect
) : boolean
參數
- rectangle
型別:System.Windows.Rect
要比較的矩形 (以筆墨空間座標表示)。
傳回值
型別:System.Boolean
如果 AnalysisRegion 的區域與指定的矩形交集,則為 true,否則為 false。
備註
如果 rectangle 的界限位於 MinXY 和 MaxXY 之外,IntersectsWith 方法會擲回 ArgumentOutOfRangeException。
範例
這個範例會測試 AnalysisRegion (名為 theFirstAnalysisRegion) 是否與指定的矩形交集。
' Test for intersection between an AnalysisRegion and a rectangle.
If theFirstAnalysisRegion.IntersectsWith(New Rect(50, 50, 100, 100)) Then
' Insert code here.
End If
// Test for intersection between an AnalysisRegion and a rectangle.
if (theFirstAnalysisRegion.IntersectsWith(
new Rect(50, 50, 100, 100)))
{
// Insert code here.
}
平台
Windows Vista
.NET Framework 和 .NET Compact Framework 並不支援各種平台的所有版本。如需支援平台版本的相關資訊,請參閱 .NET Framework 系統需求。
版本資訊
.NET Framework
支援版本:3.0