AnalysisRegion.Exclude Method (Rectangle)
Restricts the area of this AnalysisRegion to the portion of its area that does not intersect the specified rectangle.
Namespace: Microsoft.Ink
Assembly: Microsoft.Ink.Analysis (in Microsoft.Ink.Analysis.dll)
Syntax
'Declaration
Public Sub Exclude ( _
rectangleToExclude As Rectangle _
)
'Usage
Dim instance As AnalysisRegion
Dim rectangleToExclude As Rectangle
instance.Exclude(rectangleToExclude)
public void Exclude(
Rectangle rectangleToExclude
)
public:
void Exclude(
Rectangle rectangleToExclude
)
public function Exclude(
rectangleToExclude : Rectangle
)
Parameters
rectangleToExclude
Type: System.Drawing.RectangleThe area to exclude.
Remarks
If the two areas do not intersect, this AnalysisRegion is unchanged.
Examples
This example creates two AnalysisRegion objects. It uses the Intersect, Union, and Exclude methods to modify the objects' areas.
' Create an infinite AnalysisRegion.
Dim theFirstAnalysisRegion As New Microsoft.Ink.AnalysisRegion()
' Create a finite AnalysisRegion.
Dim theSecondAnalysisRegion As New Microsoft.Ink.AnalysisRegion( _
New System.Drawing.Rectangle(205, 205, 2054, 1027))
' Extend an AnalysisRegion using the Union method and an AnalysisRegion.
theFirstAnalysisRegion.Union(theSecondAnalysisRegion)
' Extend an AnalysisRegion using the Union method and a rectangle.
theFirstAnalysisRegion.Union(New Rectangle(0, 2054, 2054, 1027))
' Restrict an AnalysisRegion using the Intersect method and an AnalysisRegion.
theFirstAnalysisRegion.Intersect(theSecondAnalysisRegion)
' Restrict an AnalysisRegion using the Intersect method and a rectangle.
theFirstAnalysisRegion.Intersect(New Rectangle(750, 1000, 2500, 1500))
' Modify an AnalysisRegion using the Exclude method and an AnalysisRegion.
theFirstAnalysisRegion.Exclude(theSecondAnalysisRegion)
' Modify an AnalysisRegion using the Exclude method and a rectangle.
theFirstAnalysisRegion.Exclude(New Rectangle(750, 1000, 500, 500))
// Create an infinite AnalysisRegion.
Microsoft.Ink.AnalysisRegion theFirstAnalysisRegion =
new Microsoft.Ink.AnalysisRegion();
// Create a finite AnalysisRegion.
Microsoft.Ink.AnalysisRegion theSecondAnalysisRegion =
new Microsoft.Ink.AnalysisRegion(
new System.Drawing.Rectangle(205, 205, 2054, 1027));
// Extend an AnalysisRegion using the Union method and an AnalysisRegion.
theFirstAnalysisRegion.Union(theSecondAnalysisRegion);
// Extend an AnalysisRegion using the Union method and a rectangle.
theFirstAnalysisRegion.Union(new Rectangle(0, 2054, 2054, 1027));
// Restrict an AnalysisRegion using the Intersect method and an AnalysisRegion.
theFirstAnalysisRegion.Intersect(theSecondAnalysisRegion);
// Restrict an AnalysisRegion using the Intersect method and a rectangle.
theFirstAnalysisRegion.Intersect(new Rectangle(750, 1000, 2500, 1500));
// Modify an AnalysisRegion using the Exclude method and an AnalysisRegion.
theFirstAnalysisRegion.Exclude(theSecondAnalysisRegion);
// Modify an AnalysisRegion using the Exclude method and a rectangle.
theFirstAnalysisRegion.Exclude(new Rectangle(750, 1000, 500, 500));
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