共用方式為


AnalysisRegionBase.Union 方法 (AnalysisRegionBase)

將這個 AnalysisRegionBase 的區域擴大為其與指定的 AnalysisRegionBase 聯集所產生的區域。

命名空間:  System.Windows.Ink.AnalysisCore
組件:  IACore (在 IACore.dll 中)

語法

'宣告
Public Sub Union ( _
    regionToUnion As AnalysisRegionBase _
)
'用途
Dim instance As AnalysisRegionBase
Dim regionToUnion As AnalysisRegionBase

instance.Union(regionToUnion)
public void Union(
    AnalysisRegionBase regionToUnion
)
public:
void Union(
    AnalysisRegionBase^ regionToUnion
)
public void Union(
    AnalysisRegionBase regionToUnion
)
public function Union(
    regionToUnion : AnalysisRegionBase
)

參數

備註

如果任一個區域為無限,新區域也是無限。

範例

這個範例使用 ExcludeIntersectUnion 修改現有 AnalysisRegionBase (名為 theFirstAnalysisRegionBase) 的區域。

' Extend an AnalysisRegionBase using the Union method and
' an AnalysisRegionBase.
theFirstAnalysisRegionBase.Union(theSecondAnalysisRegionBase)

' Extend an AnalysisRegionBase using the Union method and a rectangle.
theFirstAnalysisRegionBase.Union(0, 500, 3000, 3500)

' Restrict an AnalysisRegionBase using the Intersect method and
' an AnalysisRegionBase.
theFirstAnalysisRegionBase.Intersect(theSecondAnalysisRegionBase)

' Restrict an AnalysisRegionBase using the Intersect method and a rectangle.
theFirstAnalysisRegionBase.Intersect(1000, 1000, 5000, 5000)

' Restrict an AnalysisRegionBase using the Exclude method and
' an AnalysisRegionBase.
theFirstAnalysisRegionBase.Exclude(theSecondAnalysisRegionBase)

' Modify an AnalysisRegionBase using the Exclude method and a rectangle.
theFirstAnalysisRegionBase.Exclude(1500, 1500, 2500, 2500)
// Extend an AnalysisRegionBase using the Union method and
// an AnalysisRegionBase.
theFirstAnalysisRegionBase.Union(theSecondAnalysisRegionBase);

// Extend an AnalysisRegionBase using the Union method and a rectangle.
theFirstAnalysisRegionBase.Union(0, 500, 3000, 3500);

// Restrict an AnalysisRegionBase using the Intersect method and
// an AnalysisRegionBase.
theFirstAnalysisRegionBase.Intersect(theSecondAnalysisRegionBase);

// Restrict an AnalysisRegionBase using the Intersect method and a rectangle.
theFirstAnalysisRegionBase.Intersect(1000, 1000, 5000, 5000);

// Restrict an AnalysisRegionBase using the Exclude method and
// an AnalysisRegionBase.
theFirstAnalysisRegionBase.Exclude(theSecondAnalysisRegionBase);

// Modify an AnalysisRegionBase using the Exclude method and a rectangle.
theFirstAnalysisRegionBase.Exclude(1500, 1500, 2500, 2500);

平台

Windows Vista, Windows XP SP2, Windows Server 2003

.NET Framework 和 .NET Compact Framework 並不支援各種平台的所有版本。如需支援平台版本的相關資訊,請參閱 .NET Framework 系統需求

版本資訊

.NET Framework

支援版本:3.0

請參閱

參考

AnalysisRegionBase 類別

AnalysisRegionBase 成員

Union 多載

System.Windows.Ink.AnalysisCore 命名空間

AnalysisRegionBase.Exclude

AnalysisRegionBase.Intersect