다음을 통해 공유


AnalysisRegion.Exclude 메서드 (Rect)

업데이트: 2007년 11월

AnalysisRegion의 영역을 지정된 사각형과 교차하지 않는 영역 부분으로 제한합니다.

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

구문

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

instance.Exclude(rectangleToExclude)
public void Exclude(
    Rect rectangleToExclude
)
public:
void Exclude(
    Rect rectangleToExclude
)
public void Exclude(
    Rect rectangleToExclude
)
public function Exclude(
    rectangleToExclude : Rect
)

매개 변수

설명

두 영역이 교차하지 않으면 이 AnalysisRegion은 변경되지 않습니다.

rectangleToExclude가 MinXYMaxXY로 정의된 범위의 외부에 있는 경우 Exclude 메서드는 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 멤버

Exclude 오버로드

System.Windows.Ink 네임스페이스

AnalysisRegion.GetBounds

AnalysisRegion.Exclude

AnalysisRegion.Intersect