StylusPointDescription.GetCommonDescription メソッド

定義

指定された StylusPointDescription オブジェクトの交差部分を返します。

public:
 static System::Windows::Input::StylusPointDescription ^ GetCommonDescription(System::Windows::Input::StylusPointDescription ^ stylusPointDescription, System::Windows::Input::StylusPointDescription ^ stylusPointDescriptionPreserveInfo);
public static System.Windows.Input.StylusPointDescription GetCommonDescription (System.Windows.Input.StylusPointDescription stylusPointDescription, System.Windows.Input.StylusPointDescription stylusPointDescriptionPreserveInfo);
static member GetCommonDescription : System.Windows.Input.StylusPointDescription * System.Windows.Input.StylusPointDescription -> System.Windows.Input.StylusPointDescription
Public Shared Function GetCommonDescription (stylusPointDescription As StylusPointDescription, stylusPointDescriptionPreserveInfo As StylusPointDescription) As StylusPointDescription

パラメーター

stylusPointDescription
StylusPointDescription

交差する最初の StylusPointDescription

stylusPointDescriptionPreserveInfo
StylusPointDescription

積集合を求める第 2 の StylusPointDescription

戻り値

StylusPointDescription指定したStylusPointDescriptionオブジェクトの両方に存在するプロパティを格納している 。

次の例では、2 つの異なるStylusPointDescriptionオブジェクトから共通StylusPointDescriptionを見つける方法を示します。

StylusDevice currentStylus = Stylus.CurrentStylusDevice;
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)
                    });

StylusPointDescription description2 = currentStylus.GetStylusPoints(inkCanvas1).Description;

StylusPointDescription description3 = 
    StylusPointDescription.GetCommonDescription(description1, description2);

StylusPointCollection points = currentStylus.GetStylusPoints(inkCanvas1, description3);
Dim currentStylus As StylusDevice = Stylus.CurrentStylusDevice

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)})

Dim description2 As StylusPointDescription = currentStylus.GetStylusPoints(inkCanvas1).Description

Dim description3 As StylusPointDescription = _
                        StylusPointDescription.GetCommonDescription(description1, description2)

Dim points As StylusPointCollection = currentStylus.GetStylusPoints(inkCanvas1, description3)

注釈

StylusPointDescription1stylusPointDescriptionPreserveInfo は共通のプロパティを持つことができますが、それぞれの StylusPointPropertyInfo オブジェクトで指定された制約は異なります。 制約が異なる場合、メソッドは GetCommonDescription から stylusPointDescriptionPreserveInfoを使用しますStylusPointPropertyInfo

適用対象