AnalysisRegion.Union 方法 (AnalysisRegion)
将此 AnalysisRegion 的区域扩展为它与指定的 AnalysisRegion 合并所形成的区域。
命名空间: System.Windows.Ink
程序集: IAWinFX(在 IAWinFX.dll 中)
语法
声明
Public Sub Union ( _
regionToUnion As AnalysisRegion _
)
用法
Dim instance As AnalysisRegion
Dim regionToUnion As AnalysisRegion
instance.Union(regionToUnion)
public void Union(
AnalysisRegion regionToUnion
)
public:
void Union(
AnalysisRegion^ regionToUnion
)
public void Union(
AnalysisRegion regionToUnion
)
public function Union(
regionToUnion : AnalysisRegion
)
参数
- regionToUnion
类型:System.Windows.Ink.AnalysisRegion
要与之合并的 AnalysisRegion。
备注
如果任一个区域无限,则新区域也无限。
示例
此示例创建两个 AnalysisRegion 对象。它使用 Intersect、Union 和 Exclude 方法来修改这两个对象的区域。
' Create an infinite AnalysisRegion.
Dim theFirstAnalysisRegion As New AnalysisRegion()
' Create a finite AnalysisRegion.
Dim theSecondAnalysisRegion As New AnalysisRegion(New Rect(100, 100, 200, 200))
' 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 Rect(100, 100, 200, 200))
' 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 Rect(100, 100, 200, 200))
' 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 Rect(100, 100, 200, 200))
// Create an infinite AnalysisRegion.
AnalysisRegion theFirstAnalysisRegion =
new AnalysisRegion();
// Create a finite AnalysisRegion.
AnalysisRegion theSecondAnalysisRegion =
new AnalysisRegion(
new Rect(100, 100, 200, 200));
// 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 Rect(100, 100, 200, 200));
// 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 Rect(100, 100, 200, 200));
// 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 Rect(100, 100, 200, 200));
平台
Windows Vista
.NET Framework 和 .NET Compact Framework 并不是对每个平台的所有版本都提供支持。有关支持的版本的列表,请参见.NET Framework 系统要求。
版本信息
.NET Framework
受以下版本支持:3.0