Share via


AnalysisRegionBase.Union Method (AnalysisRegionBase)

Expands the area of this AnalysisRegionBase to the area created by its union with the specified AnalysisRegionBase.

Namespace:  System.Windows.Ink.AnalysisCore
Assembly:  IACore (in IACore.dll)

Syntax

'Declaration
Public Sub Union ( _
    regionToUnion As AnalysisRegionBase _
)
'Usage
Dim instance As AnalysisRegionBase 
Dim regionToUnion As AnalysisRegionBase

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

Parameters

Remarks

If either area is infinite, the new area is also infinite.

Examples

The example uses Exclude, Intersect, and Union to modify the area of an existing AnalysisRegionBase, named 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);

Platforms

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

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

See Also

Reference

AnalysisRegionBase Class

AnalysisRegionBase Members

Union Overload

System.Windows.Ink.AnalysisCore Namespace

AnalysisRegionBase.Exclude

AnalysisRegionBase.Intersect