다음을 통해 공유


AnalysisRegion.Union 메서드 (Rect)

업데이트: 2007년 11월

AnalysisRegion의 영역을 해당 영역과 지정된 사각형의 합집합으로 만들어진 영역으로 확장합니다.

네임스페이스:  System.Windows.Ink
어셈블리:  IAWinFX(IAWinFX.dll)

구문

‘선언
Public Sub Union ( _
    rectangle As Rect _
)
‘사용 방법
Dim instance As AnalysisRegion
Dim rectangle As Rect

instance.Union(rectangle)
public void Union(
    Rect rectangle
)
public:
void Union(
    Rect rectangle
)
public void Union(
    Rect rectangle
)
public function Union(
    rectangle : Rect
)

매개 변수

  • rectangle
    형식: System.Windows.Rect
    잉크 공간 좌표에서 결합할 사각형입니다.

설명

rectangle이 MinXYMaxXY로 정의된 범위의 외부에 있는 경우 Union 메서드는 ArgumentOutOfRangeException을 throw합니다.

예제

이 예제에서는 두 AnalysisRegion 개체를 만듭니다. 그런 다음 Intersect, UnionExclude 메서드를 사용하여 개체의 영역을 수정합니다.

' 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에서 지원

참고 항목

참조

AnalysisRegion 클래스

AnalysisRegion 멤버

Union 오버로드

System.Windows.Ink 네임스페이스

AnalysisRegion.GetBounds

AnalysisRegion.Exclude

AnalysisRegion.Intersect