StylusPointCollection.Reformat(StylusPointDescription) Methode

Definition

Sucht die Schnittmenge der angegebenen StylusPointDescription und der Description-Eigenschaft.

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

Parameter

subsetToReformatTo
StylusPointDescription

Eine StylusPointDescription, deren Schnittmenge mit der StylusPointDescription der aktuellen StylusPointCollection gebildet werden soll.

Gibt zurück

Eine StylusPointCollection mit einer StylusPointDescription, die eine Teilmenge der angegebenen StylusPointDescription ist, und die StylusPointDescription, die die aktuelle StylusPointCollection verwendet.

Ausnahmen

subsetToReformatTo ist keine Teilmenge der Description-Eigenschaft.

Beispiele

Im folgenden Beispiel wird veranschaulicht, wie eine neue StylusPointCollection erstellt wird, die eine andere StylusPointDescriptionverwendet.

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)

Hinweise

subsetToReformatTo ist eine StylusPointDescription , die eine Teilmenge von Werten beschreibt, die Description zur -Eigenschaft gehören. Verwenden Sie die GetCommonDescription -Methode, um einen StylusPointDescription abzurufen, der den des Description aktuellen StylusPointCollectionüberschneidet.

Die Reformat -Methode gibt ein StylusPointCollection -Objekt zurück, das die gleichen StylusPoint Objekte wie die objekte enthält, die zum aktuellen StylusPointCollectiongehören. Die StylusPoint -Objekte in der neuen StylusPointCollection verwenden subsetToReformatTo als StylusPointDescription.

Hinweis

Reformat verwendet die Einschränkungen der StylusPointPropertyInfoDescription -Eigenschaft, auch wenn die Einschränkungen in subsetToReformatTo unterschiedlich sind. Wenn beispielsweise die Werte 0 und 1023 für NormalPressure verwendet werden, subsetToReformatTo während Description die Werte 0 und 255 verwendet werden. Reformat gibt einen StylusPointDescription mit den Werten 0 und 255 zurück.

Gilt für: