Compartir a través de


AnalysisRegion.Intersect (Método) (AnalysisRegion)

Actualización: noviembre 2007

Restringe el área de este objeto AnalysisRegion al área creada por su intersección con el objeto AnalysisRegion especificado.

Espacio de nombres:  Microsoft.Ink
Ensamblado:  Microsoft.Ink.Analysis (en Microsoft.Ink.Analysis.dll)

Sintaxis

'Declaración
Public Sub Intersect ( _
    regionToIntersect As AnalysisRegion _
)
'Uso
Dim instance As AnalysisRegion
Dim regionToIntersect As AnalysisRegion

instance.Intersect(regionToIntersect)
public void Intersect(
    AnalysisRegion regionToIntersect
)
public:
void Intersect(
    AnalysisRegion^ regionToIntersect
)
public void Intersect(
    AnalysisRegion regionToIntersect
)
public function Intersect(
    regionToIntersect : AnalysisRegion
)

Parámetros

Comentarios

Si las dos áreas no intersecan, la nueva área estará vacía.

Ejemplos

En este ejemplo se crean dos objetos AnalysisRegion. Utiliza los métodos Intersect, Union y Exclude para modificar las áreas de los objetos.

' 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));

Plataformas

Windows Vista

.NET Framework y .NET Compact Framework no admiten todas las versiones de cada plataforma. Para obtener una lista de las versiones compatibles, vea Requisitos de sistema de .NET Framework.

Información de versión

.NET Framework

Compatible con: 3.0

Vea también

Referencia

AnalysisRegion (Clase)

AnalysisRegion (Miembros)

Intersect (Sobrecarga)

Microsoft.Ink (Espacio de nombres)

AnalysisRegion.GetBounds

AnalysisRegion.Exclude

AnalysisRegion.Union