Share via


StylusPointCollection.Reformat(StylusPointDescription) Yöntem

Tanım

Belirtilen StylusPointDescription ve özelliğinin kesişimini Description bulur.

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

Parametreler

subsetToReformatTo
StylusPointDescription

StylusPointDescription Geçerli StylusPointCollectionöğesinin ile StylusPointDescription kesişmek için A.

Döndürülenler

StylusPointCollection Belirtilen ve geçerli StylusPointCollection tarafından kullanılan StylusPointDescription alt kümesine StylusPointDescription sahip StylusPointDescription olan bir.

Özel durumlar

subsetToReformatTo özelliğin Description bir alt kümesi değildir.

Örnekler

Aşağıdaki örnekte, farklı StylusPointDescriptionbir kullanan yeni StylusPointCollection öğesinin nasıl oluşturulacağı gösterilmektedir.

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)

Açıklamalar

subsetToReformatToStylusPointDescription özelliğine Description ait değerlerin bir alt kümesini açıklayan bir değerdir. GetCommonDescription Geçerli StylusPointCollectionöğesinin kesiştiği Description bir StylusPointDescription almak için yöntemini kullanın.

yöntemi, Reformat geçerli StylusPointCollectionöğesine ait olanlarla aynı StylusPoint nesneleri içeren bir StylusPointCollection döndürür. StylusPoint Yeni StylusPointCollection içindeki nesneler olarak StylusPointDescriptionkullanırsubsetToReformatTo.

Not

Reformat içindeki kısıtlamalar StylusPointPropertyInfoDescription farklı olsa bile özelliğinin kısıtlamalarını subsetToReformatTo kullanır. Örneğin, için 0 ve 1023 NormalPressureDescription değerlerini, 0 ve 255 değerlerini kullanırsasubsetToReformatTo. Reformat 0 ve 255 değerlerini kullanarak bir StylusPointDescription döndürür.

Şunlara uygulanır