Partager via


AnalysisRegion.Intersect, méthode (AnalysisRegion)

Mise à jour : November 2007

Restreint la zone du AnalysisRegion à la zone créée par son intersection avec le AnalysisRegion spécifié.

Espace de noms :  Microsoft.Ink
Assembly :  Microsoft.Ink.Analysis (dans Microsoft.Ink.Analysis.dll)

Syntaxe

'Déclaration
Public Sub Intersect ( _
    regionToIntersect As AnalysisRegion _
)
'Utilisation
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
)

Paramètres

Notes

Si les deux zones ne se croisent pas, la nouvelle zone est vide.

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

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

Intersect, surcharge

Microsoft.Ink, espace de noms

AnalysisRegion.GetBounds

AnalysisRegion.Exclude

AnalysisRegion.Union