다음을 통해 공유


AnalysisRegion.Intersect 메서드 (Rectangle)

업데이트: 2007년 11월

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

네임스페이스:  Microsoft.Ink
어셈블리:  Microsoft.Ink.Analysis(Microsoft.Ink.Analysis.dll)

구문

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

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

매개 변수

설명

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

예제

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

' Create an infinite AnalysisRegion.
Dim theFirstAnalysisRegion As New Microsoft.Ink.AnalysisRegion()

' Create a finite AnalysisRegion.
Dim theSecondAnalysisRegion As New Microsoft.Ink.AnalysisRegion( _
    New System.Drawing.Rectangle(205, 205, 2054, 1027))

' 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 Rectangle(0, 2054, 2054, 1027))

' 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 Rectangle(750, 1000, 2500, 1500))

' 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 Rectangle(750, 1000, 500, 500))
            // Create an infinite AnalysisRegion.
            Microsoft.Ink.AnalysisRegion theFirstAnalysisRegion =
                new Microsoft.Ink.AnalysisRegion();

            // Create a finite AnalysisRegion.
            Microsoft.Ink.AnalysisRegion theSecondAnalysisRegion =
                new Microsoft.Ink.AnalysisRegion(
                    new System.Drawing.Rectangle(205, 205, 2054, 1027));

            // 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 Rectangle(0, 2054, 2054, 1027));

            // 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 Rectangle(750, 1000, 2500, 1500));

            // 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 Rectangle(750, 1000, 500, 500));

플랫폼

Windows Vista

.NET Framework 및 .NET Compact Framework에서 모든 플랫폼의 전체 버전을 지원하지는 않습니다. 지원되는 버전의 목록을 보려면 .NET Framework 시스템 요구 사항을 참조하십시오.

버전 정보

.NET Framework

3.0에서 지원

참고 항목

참조

AnalysisRegion 클래스

AnalysisRegion 멤버

Intersect 오버로드

Microsoft.Ink 네임스페이스

AnalysisRegion.GetBounds

AnalysisRegion.Exclude

AnalysisRegion.Union