StylusPointCollection.Reformat(StylusPointDescription) 메서드

정의

지정된 StylusPointDescriptionDescription 속성의 공통 속성을 찾습니다.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

매개 변수

subsetToReformatTo
StylusPointDescription

현재 StylusPointDescriptionStylusPointDescription과 공통되는 StylusPointCollection입니다.A StylusPointDescription to intersect with the StylusPointDescription of the current StylusPointCollection.

반환

지정된 StylusPointCollection과 현재 StylusPointDescription에서 사용하는 StylusPointDescription의 하위 집합인 StylusPointDescription을 포함하는 StylusPointCollection입니다.A StylusPointCollection that has a StylusPointDescription that is a subset of the specified StylusPointDescription and the StylusPointDescription that the current StylusPointCollection uses.

예외

subsetToReformatToDescription 속성의 하위 집합이 아닌 경우subsetToReformatTo is not a subset of the Description property.

예제

다음 예제에서는 새로 만드는 방법을 보여 줍니다 StylusPointCollection 를 사용 하는 다른 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)

설명

subsetToReformatTo StylusPointDescription 에 속하는 값의 하위 집합을 설명 하는 Description 속성.subsetToReformatTo is a StylusPointDescription which describes a subset of values belonging to the Description property. 사용 하 여 합니다 GetCommonDescription 메서드를를 StylusPointDescription 과 교차 하는 합니다 Description 현재 StylusPointCollection합니다.Use the GetCommonDescription method to get a StylusPointDescription that intersects the Description of the current StylusPointCollection.

Reformat 메서드가 반환 되는 StylusPointCollection 동일한 포함 하는 StylusPoint 현재 속한 개체로 StylusPointCollection합니다.The Reformat method returns a StylusPointCollection that contains the same StylusPoint objects as those belonging to the current StylusPointCollection. 합니다 StylusPoint 새 개체 StylusPointCollection 사용 하 여 subsetToReformatToStylusPointDescription합니다.The StylusPoint objects in the new StylusPointCollection uses subsetToReformatTo as the StylusPointDescription.

참고

Reformat 제약 조건을 사용 하는 StylusPointPropertyInfoDescription 속성, 경우에도의 제약 조건이 subsetToReformatTo 다릅니다.Reformat uses the constraints from the StylusPointPropertyInfo of the Description property, even if the constraints in subsetToReformatTo are different. 예를 들어 경우 subsetToReformatTo 0-1023에 대 한 값을 사용 하 여 NormalPressure 반면 Description 값 0과 255를 사용 합니다.For example, if subsetToReformatTo uses the values 0 and 1023 for NormalPressure whereas Description uses the values 0 and 255. Reformat 반환을 StylusPointDescription 값을 사용 하 여 0에서 255입니다.Reformat returns a StylusPointDescription using the values, 0 and 255.

적용 대상