Metodo AnalysisRegion.Exclude (Rect)
Aggiornamento: novembre 2007
Limita l'area di AnalysisRegion alla parte dell'area che non interseca il rettangolo specificato.
Spazio dei nomi: System.Windows.Ink
Assembly: IAWinFX (in IAWinFX.dll)
Sintassi
'Dichiarazione
Public Sub Exclude ( _
rectangleToExclude As Rect _
)
'Utilizzo
Dim instance As AnalysisRegion
Dim rectangleToExclude As Rect
instance.Exclude(rectangleToExclude)
public void Exclude(
Rect rectangleToExclude
)
public:
void Exclude(
Rect rectangleToExclude
)
public void Exclude(
Rect rectangleToExclude
)
public function Exclude(
rectangleToExclude : Rect
)
Parametri
- rectangleToExclude
Tipo: System.Windows.Rect
Area da escludere.
Note
Se le due aree non si intersecano, AnalysisRegion non viene modificato.
Il metodo Exclude genera un'eccezione ArgumentOutOfRangeException se i limiti di rectangleToExclude non sono compresi tra i valori definiti da MinXY e MaxXY.
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 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));
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