Partager via


AnalysisRegion.Exclude, méthode (Rect)

Mise à jour : November 2007

Restreint la zone de ce AnalysisRegion à la partie de sa zone qui ne croise pas le rectangle spécifié.

Espace de noms :  System.Windows.Ink
Assembly :  IAWinFX (dans IAWinFX.dll)

Syntaxe

'Déclaration
Public Sub Exclude ( _
    rectangleToExclude As Rect _
)
'Utilisation
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
)

Paramètres

Notes

Si les deux zones ne se croisent pas, le AnalysisRegion n'est pas modifié.

La méthode Exclude lève une ArgumentOutOfRangeException si le rectangleToExclude se trouve en dehors des limites définies par MinXY et MaxXY.

Exemples

Cet exemple crée deux objets AnalysisRegion. Les méthodes Intersect, Union et Exclude sont utilisées pour modifier les zones des objets.

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

Plateformes

Windows Vista

Le .NET Framework et le .NET Compact Framework ne prennent pas en charge toutes les versions de chaque plateforme. Pour obtenir la liste des versions prises en charge, consultez Configuration requise du .NET Framework.

Informations de version

.NET Framework

Pris en charge dans : 3.0

Voir aussi

Référence

AnalysisRegion, classe

Membres AnalysisRegion

Exclude, surcharge

System.Windows.Ink, espace de noms

AnalysisRegion.GetBounds

AnalysisRegion.Exclude

AnalysisRegion.Intersect