Condividi tramite


Metodo AnalysisRegion.Union (AnalysisRegion)

Aggiornamento: novembre 2007

Espande l'area di questo oggetto AnalysisRegion all'area creata dall'unione con l'oggetto AnalysisRegion specificato.

Spazio dei nomi:  Microsoft.Ink
Assembly:  Microsoft.Ink.Analysis (in Microsoft.Ink.Analysis.dll)

Sintassi

'Dichiarazione
Public Sub Union ( _
    regionToUnion As AnalysisRegion _
)
'Utilizzo
Dim instance As AnalysisRegion
Dim regionToUnion As AnalysisRegion

instance.Union(regionToUnion)
public void Union(
    AnalysisRegion regionToUnion
)
public:
void Union(
    AnalysisRegion^ regionToUnion
)
public void Union(
    AnalysisRegion regionToUnion
)
public function Union(
    regionToUnion : AnalysisRegion
)

Parametri

Note

Se una delle aree è infinita, lo è anche la nuova area.

Esempi

In questo esempio vengono creati due oggetti AnalysisRegion. Vengono utilizzati i metodi Intersect, Union e Exclude per modificare le aree degli oggetti.

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

Piattaforme

Windows Vista

.NET Framework e .NET Compact Framework non supportano tutte le versioni di ciascuna piattaforma. Per un elenco delle versioni supportate, vedere Requisiti di sistema di .NET Framework.

Informazioni sulla versione

.NET Framework

Supportato in: 3.0

Vedere anche

Riferimenti

AnalysisRegion Classe

Membri AnalysisRegion

Overload Union

Spazio dei nomi Microsoft.Ink

AnalysisRegion.GetBounds

AnalysisRegion.Exclude

AnalysisRegion.Intersect