StylusPointCollection.Reformat(StylusPointDescription) Methode
Definitie
Belangrijk
Bepaalde informatie heeft betrekking op een voorlopige productversie die aanzienlijk kan worden gewijzigd voordat deze wordt uitgebracht. Microsoft biedt geen enkele expliciete of impliciete garanties met betrekking tot de informatie die hier wordt verstrekt.
Hiermee vindt u het snijpunt van de opgegeven StylusPointDescription en de Description eigenschap.
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
Parameters
- subsetToReformatTo
- StylusPointDescription
Een StylusPointDescription om te snijden met de StylusPointDescription huidige StylusPointCollection.
Retouren
Een StylusPointCollection met een StylusPointDescription subset van de opgegeven StylusPointDescription en de StylusPointDescription waarde die de huidige StylusPointCollection gebruikt.
Uitzonderingen
subsetToReformatTo is geen subset van de Description eigenschap.
Voorbeelden
In het volgende voorbeeld ziet u hoe u een nieuwe StylusPointCollection maakt die gebruikmaakt van een ander 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)
Opmerkingen
subsetToReformatTo is een StylusPointDescription beschrijving van een subset van waarden die behoren tot de Description eigenschap. Gebruik de GetCommonDescription methode om een StylusPointDescription methode op te halen die de Description huidige StylusPointCollectionbesnijdt.
De Reformat methode retourneert een StylusPointCollection die dezelfde StylusPoint objecten bevat als objecten die behoren tot de huidige StylusPointCollection. De StylusPoint objecten in het nieuwe StylusPointCollection gebruik als subsetToReformatTo de StylusPointDescription.
Note
Reformat gebruikt de beperkingen van de StylusPointPropertyInfoDescription eigenschap, zelfs als de beperkingen subsetToReformatTo verschillen. Als u bijvoorbeeld subsetToReformatTo de waarden 0 en 1023 gebruikt voor NormalPressure de Description waarden 0 en 255.
Reformat retourneert een StylusPointDescription met behulp van de waarden 0 en 255.