다음을 통해 공유


AnalysisRegion.Intersect 메서드 (Rect)

업데이트: 2007년 11월

현재 AnalysisRegion을 영역 및 지정된 사각형 모두와 교차하는 영역으로 제한합니다.

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

구문

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

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

매개 변수

  • rectangle
    형식: System.Windows.Rect
    잉크 공간 좌표에서 교차시킬 사각형입니다.

설명

두 영역이 교차하지 않는 경우 새 영역은 비어 있습니다.

rectangle의 범위가 MinXYMaxXY 외부인 경우 Intersect 메서드는 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 멤버

Intersect 오버로드

System.Windows.Ink 네임스페이스

AnalysisRegion.GetBounds

AnalysisRegion.Exclude

AnalysisRegion.Union