Share via


AnalysisRegion.IntersectsWith Method

Determines whether the area of the AnalysisRegion intersects with the specified rectangle.

Namespace: System.Windows.Ink
Assembly: IAWinFX (in iawinfx.dll)

Syntax

'Declaration
Public Function IntersectsWith ( _
    rectangle As Rect _
) As Boolean
'Usage
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
Not applicable.

Parameters

  • rectangle
    The rectangle with which to compare, in ink space coordinates.

Return Value

true if the area of the AnalysisRegion intersects with the specified rectangle; otherwise, false.

Remarks

The IntersectsWith method throws an ArgumentOutOfRangeException if rectangle has bounds outside of MinXY and MaxXY.

Example

This example tests whether the AnalysisRegion, theFirstAnalysisRegion, intersects with a specified rectangle.

' 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.
}

Platforms

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

Version Information

.NET Framework

Supported in: 3.0

See Also

Reference

AnalysisRegion Class
AnalysisRegion Members
System.Windows.Ink Namespace