AnalysisRegion.IntersectsWith Method
Determines whether the area of the AnalysisRegion intersects with the specified rectangle.
Namespace: Microsoft.Ink
Assembly: Microsoft.Ink.Analysis (in Microsoft.Ink.Analysis.dll)
Syntax
'Declaration
Public Function IntersectsWith ( _
rectangle As Rectangle _
) As Boolean
'Usage
Dim instance As AnalysisRegion
Dim rectangle As Rectangle
Dim returnValue As Boolean
returnValue = instance.IntersectsWith(rectangle)
public bool IntersectsWith(
Rectangle rectangle
)
public:
bool IntersectsWith(
Rectangle rectangle
)
public function IntersectsWith(
rectangle : Rectangle
) : boolean
Parameters
rectangle
Type: System.Drawing.RectangleThe rectangle with which to compare, in ink space coordinates.
Return Value
Type: System.Boolean
true if the area of the AnalysisRegion intersects with the specified rectangle; otherwise, false.
Remarks
The comparison is in ink space coordinates.
If the rectangle passed only shares a border with one of the rectangles of the analysis region IntersectsWith returns false.
Examples
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 System.Drawing.Rectangle(50, 50, 100, 100)) Then
' Insert code here.
End If
// Test for intersection between an AnalysisRegion and a rectangle.
if (theFirstAnalysisRegion.IntersectsWith(
new System.Drawing.Rectangle(50, 50, 100, 100)))
{
// Insert code here.
}
Platforms
Windows 7, Windows Vista, Windows Server 2008 R2, Windows Server 2008
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Version Information
.NET Framework
Supported in: 3.0