StylusPointCollection.Reformat(StylusPointDescription) Méthode

Définition

Recherche l'intersection de l'objet StylusPointDescription spécifié et de la propriété Description.Finds the intersection of the specified StylusPointDescription and the Description property.

public:
 System::Windows::Input::StylusPointCollection ^ Reformat(System::Windows::Input::StylusPointDescription ^ subsetToReformatTo);
public System.Windows.Input.StylusPointCollection Reformat (System.Windows.Input.StylusPointDescription subsetToReformatTo);
member this.Reformat : System.Windows.Input.StylusPointDescription -> System.Windows.Input.StylusPointCollection
Public Function Reformat (subsetToReformatTo As StylusPointDescription) As StylusPointCollection

Paramètres

subsetToReformatTo
StylusPointDescription

StylusPointDescription en intersection avec l'objet StylusPointDescription de la classe StylusPointCollection actuelle.A StylusPointDescription to intersect with the StylusPointDescription of the current StylusPointCollection.

Retours

StylusPointCollection

StylusPointCollection qui comporte StylusPointDescription correspondant à un sous-ensemble de l'objet StylusPointDescription spécifié et de l'objet StylusPointDescription utilisé par la classe StylusPointCollection actuelle.A StylusPointCollection that has a StylusPointDescription that is a subset of the specified StylusPointDescription and the StylusPointDescription that the current StylusPointCollection uses.

Exceptions

subsetToReformatTo n'est pas un sous-ensemble de la propriété Description.subsetToReformatTo is not a subset of the Description property.

Exemples

L’exemple suivant montre comment créer un nouveau StylusPointCollection qui utilise un différent StylusPointDescription .The following example demonstrates how to create a new StylusPointCollection that uses a different StylusPointDescription.

StylusPointDescription description1 =
      new StylusPointDescription(new StylusPointPropertyInfo[]
                    {
                        new StylusPointPropertyInfo(StylusPointProperties.X),
                        new StylusPointPropertyInfo(StylusPointProperties.Y),
                        new StylusPointPropertyInfo(StylusPointProperties.NormalPressure),
                        new StylusPointPropertyInfo(StylusPointProperties.XTiltOrientation),
                        new StylusPointPropertyInfo(StylusPointProperties.YTiltOrientation),
                        new StylusPointPropertyInfo(StylusPointProperties.BarrelButton)
                    });

// Create a StylusPointCollection that uses description1 as its
// StylusPointDescription.
StylusPointCollection points = new StylusPointCollection(description1);

StylusPointDescription description2 =   
      new StylusPointDescription(new StylusPointPropertyInfo[]
                    {
                        new StylusPointPropertyInfo(StylusPointProperties.X),
                        new StylusPointPropertyInfo(StylusPointProperties.Y),
                        new StylusPointPropertyInfo(StylusPointProperties.NormalPressure),
                        new StylusPointPropertyInfo(StylusPointProperties.ButtonPressure),
                        new StylusPointPropertyInfo(StylusPointProperties.BarrelButton)
                    });

// Find the common StylusPointDescription between description1
// and description2.  Get a StylusPointCollection that uses the
// common StylusPointDescription.
StylusPointDescription common =
    StylusPointDescription.GetCommonDescription(description1, description2);

StylusPointCollection points2 = points.Reformat(common);
Dim description1 As New StylusPointDescription( _
    New StylusPointPropertyInfo() {New StylusPointPropertyInfo(StylusPointProperties.X), _
                                   New StylusPointPropertyInfo(StylusPointProperties.Y), _
                                   New StylusPointPropertyInfo(StylusPointProperties.NormalPressure), _
                                   New StylusPointPropertyInfo(StylusPointProperties.XTiltOrientation), _
                                   New StylusPointPropertyInfo(StylusPointProperties.YTiltOrientation), _
                                   New StylusPointPropertyInfo(StylusPointProperties.BarrelButton)})

' Create a StylusPointCollection that uses description1 as its
' StylusPointDescription.
Dim points As New StylusPointCollection(description1)

Dim description2 As New StylusPointDescription( _
    New StylusPointPropertyInfo() {New StylusPointPropertyInfo(StylusPointProperties.X), _
                                   New StylusPointPropertyInfo(StylusPointProperties.Y), _
                                   New StylusPointPropertyInfo(StylusPointProperties.NormalPressure), _
                                   New StylusPointPropertyInfo(StylusPointProperties.ButtonPressure), _
                                   New StylusPointPropertyInfo(StylusPointProperties.BarrelButton)})

' Find the common StylusPointDescription between description1
' and description2.  Get a StylusPointCollection that uses the
' common StylusPointDescription.
Dim common As StylusPointDescription = _
        StylusPointDescription.GetCommonDescription(description1, description2)

Dim points2 As StylusPointCollection = points.Reformat(common)

Remarques

subsetToReformatTo est un StylusPointDescription qui décrit un sous-ensemble de valeurs appartenant à la Description propriété.subsetToReformatTo is a StylusPointDescription which describes a subset of values belonging to the Description property. Utilisez la GetCommonDescription méthode pour obtenir un StylusPointDescription qui croise le Description du actuel StylusPointCollection .Use the GetCommonDescription method to get a StylusPointDescription that intersects the Description of the current StylusPointCollection.

La Reformat méthode retourne un StylusPointCollection qui contient les mêmes StylusPoint objets que ceux qui appartiennent à l’objet actuel StylusPointCollection .The Reformat method returns a StylusPointCollection that contains the same StylusPoint objects as those belonging to the current StylusPointCollection. Les StylusPoint objets dans le nouveau StylusPointCollection utilisent subsetToReformatTo comme StylusPointDescription .The StylusPoint objects in the new StylusPointCollection uses subsetToReformatTo as the StylusPointDescription.

Notes

Reformat utilise les contraintes du StylusPointPropertyInfo de la Description propriété, même si les contraintes dans subsetToReformatTo sont différentes.Reformat uses the constraints from the StylusPointPropertyInfo of the Description property, even if the constraints in subsetToReformatTo are different. Par exemple, si subsetToReformatTo utilise les valeurs 0 et 1023 pour, NormalPressure tandis que Description utilise les valeurs 0 et 255.For example, if subsetToReformatTo uses the values 0 and 1023 for NormalPressure whereas Description uses the values 0 and 255. Reformat retourne un StylusPointDescription à l’aide des valeurs, 0 et 255.Reformat returns a StylusPointDescription using the values, 0 and 255.

S’applique à