Condividi tramite


Metodo AnalysisRegion.Exclude (Rectangle)

Aggiornamento: novembre 2007

Limita l'area di questo oggetto AnalysisRegion alla sezione dell'area che non interseca il rettangolo specificato.

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

Sintassi

'Dichiarazione
Public Sub Exclude ( _
    rectangleToExclude As Rectangle _
)
'Utilizzo
Dim instance As AnalysisRegion
Dim rectangleToExclude As Rectangle

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

Parametri

Note

Se le due aree non si intersecano, questo oggetto AnalysisRegion non viene modificato.

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 Exclude

Spazio dei nomi Microsoft.Ink

AnalysisRegion.GetBounds

AnalysisRegion.Exclude

AnalysisRegion.Intersect