AnalysisRegion.Exclude 方法 (AnalysisRegion)
将此 AnalysisRegion 的区域限制为其区域与指定的 AnalysisRegion 不相交的部分。
命名空间: Microsoft.Ink
程序集: Microsoft.Ink.Analysis(在 Microsoft.Ink.Analysis.dll 中)
语法
声明
Public Sub Exclude ( _
regionToExclude As AnalysisRegion _
)
用法
Dim instance As AnalysisRegion
Dim regionToExclude As AnalysisRegion
instance.Exclude(regionToExclude)
public void Exclude(
AnalysisRegion regionToExclude
)
public:
void Exclude(
AnalysisRegion^ regionToExclude
)
public void Exclude(
AnalysisRegion regionToExclude
)
public function Exclude(
regionToExclude : AnalysisRegion
)
参数
- regionToExclude
类型:Microsoft.Ink.AnalysisRegion
描绘要排除的区域的 AnalysisRegion。
备注
如果两个区域不相交,则此 AnalysisRegion 不变。
示例
此示例创建两个 AnalysisRegion 对象。它使用 Intersect、Union 和 Exclude 方法来修改这两个对象的区域。
' 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));
平台
Windows Vista
.NET Framework 和 .NET Compact Framework 并不是对每个平台的所有版本都提供支持。有关支持的版本的列表,请参见.NET Framework 系统要求。
版本信息
.NET Framework
受以下版本支持:3.0