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

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

Döndürülenler

StylusPointCollection Belirtilen StylusPointDescriptionStylusPointDescription ve geçerlinin StylusPointDescription kullandığı alt kümesine sahip StylusPointCollection olan bir.

Özel durumlar

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

Örnekler

Aşağıdaki örnekte farklı StylusPointCollectionbir kullanan yeni StylusPointDescription bir öğ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

subsetToReformatTo StylusPointDescription, özelliğine Description ait değerlerin bir alt kümesini açıklayan bir değerdir. Geçerli GetCommonDescriptionöğesinin StylusPointDescription kesiştiği Description bir StylusPointCollection 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 subsetToReformatTokullanırStylusPointDescription.

Note

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 subsetToReformatTo değerlerini kullanırken NormalPressureDescription 0 ve 255 değerlerini kullanır. Reformat 0 ve 255 değerlerini kullanarak bir StylusPointDescription döndürür.

Şunlara uygulanır