StylusPointCollection.Reformat(StylusPointDescription) Metode
Definisi
Penting
Beberapa informasi terkait produk prarilis yang dapat diubah secara signifikan sebelum dirilis. Microsoft tidak memberikan jaminan, tersirat maupun tersurat, sehubungan dengan informasi yang diberikan di sini.
Menemukan persimpangan dari properti yang ditentukan StylusPointDescription dan Description .
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
Parameter
- subsetToReformatTo
- StylusPointDescription
A StylusPointDescription untuk bersinggungan StylusPointDescription dengan dari saat ini StylusPointCollection.
Mengembalikan
StylusPointCollection yang memiliki StylusPointDescription yang merupakan subset dari yang ditentukan StylusPointDescription dan StylusPointDescription yang digunakan saat iniStylusPointCollection.
Pengecualian
subsetToReformatTo
bukan subset properti Description .
Contoh
Contoh berikut menunjukkan cara membuat baru StylusPointCollection yang menggunakan yang berbeda 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)
Keterangan
subsetToReformatTo
adalah StylusPointDescription yang menjelaskan subset nilai milik Description properti . GetCommonDescription Gunakan metode untuk mendapatkan StylusPointDescription yang bersinggungan dengan Description dari saat iniStylusPointCollection.
Metode mengembalikan Reformat yang StylusPointCollection berisi objek yang sama StylusPoint dengan yang termasuk dalam .StylusPointCollection Objek StylusPoint dalam yang baru StylusPointCollection menggunakan subsetToReformatTo
sebagai StylusPointDescription.
Catatan
Reformat menggunakan batasan dari StylusPointPropertyInfoDescription properti , bahkan jika batasan di subsetToReformatTo
berbeda. Misalnya, jika subsetToReformatTo
menggunakan nilai 0 dan 1023 untuk NormalPressure sedangkan Description menggunakan nilai 0 dan 255. ReformatStylusPointDescription mengembalikan menggunakan nilai, 0 dan 255.
Berlaku untuk
Saran dan Komentar
https://aka.ms/ContentUserFeedback.
Segera hadir: Sepanjang tahun 2024 kami akan menghentikan penggunaan GitHub Issues sebagai mekanisme umpan balik untuk konten dan menggantinya dengan sistem umpan balik baru. Untuk mengetahui informasi selengkapnya, lihat:Kirim dan lihat umpan balik untuk