Aracılığıyla paylaş


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 StylusPointDescriptionStylusPointCollectionöğesinin StylusPointDescription ile kesişmek için A.

Döndürülenler

StylusPointCollection Belirtilen StylusPointDescriptionStylusPointDescription ve geçerlinin StylusPointCollection kullandığı alt kümesine 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 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 StylusPointCollectionöğesinin GetCommonDescription 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.

Uyarı

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

Şunlara uygulanır