StylusPoint Konstruktoren
Definition
Wichtig
Einige Informationen beziehen sich auf Vorabversionen, die vor dem Release ggf. grundlegend überarbeitet werden. Microsoft übernimmt hinsichtlich der hier bereitgestellten Informationen keine Gewährleistungen, seien sie ausdrücklich oder konkludent.
Initialisiert eine neue Instanz der StylusPoint-Klasse.
Überlädt
| Name | Beschreibung |
|---|---|
| StylusPoint(Double, Double) |
Initialisiert eine neue Instanz der StylusPoint Klasse mit angegebenen (x, y)-Koordinaten. |
| StylusPoint(Double, Double, Single) |
Initialisiert eine neue Instanz der StylusPoint Klasse mit angegebenen (x, y)-Koordinaten und Druck. |
| StylusPoint(Double, Double, Single, StylusPointDescription, Int32[]) |
Initialisiert eine neue Instanz der StylusPoint Klasse mit angegebenen (x, y)-Koordinaten, a |
StylusPoint(Double, Double)
Initialisiert eine neue Instanz der StylusPoint Klasse mit angegebenen (x, y)-Koordinaten.
public:
StylusPoint(double x, double y);
public StylusPoint(double x, double y);
new System.Windows.Input.StylusPoint : double * double -> System.Windows.Input.StylusPoint
Public Sub New (x As Double, y As Double)
Parameter
- x
- Double
Die x-Koordinate der StylusPoint.
- y
- Double
Die y-Koordinate des StylusPoint.
Beispiele
Das folgende Beispiel veranschaulicht das Erstellen eines StylusPoint.
StylusPointDescription newDescription =
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)
});
int[] propertyValues = { 1800, 1000, 1 };
StylusPoint newStylusPoint = new StylusPoint(100, 100, .5f, newDescription, propertyValues);
Dim newDescription 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 propertyValues As Integer() = {1800, 1000, 1}
Dim newStylusPoint As New StylusPoint(100, 100, 0.5F, newDescription, propertyValues)
Gilt für:
StylusPoint(Double, Double, Single)
Initialisiert eine neue Instanz der StylusPoint Klasse mit angegebenen (x, y)-Koordinaten und Druck.
public:
StylusPoint(double x, double y, float pressureFactor);
public StylusPoint(double x, double y, float pressureFactor);
new System.Windows.Input.StylusPoint : double * double * single -> System.Windows.Input.StylusPoint
Public Sub New (x As Double, y As Double, pressureFactor As Single)
Parameter
- x
- Double
Die x-Koordinate der StylusPoint.
- y
- Double
Die y-Koordinate des StylusPoint.
- pressureFactor
- Single
Die Druckmenge, die auf die StylusPoint.
Ausnahmen
pressureFactor ist kleiner als 0 oder größer als 1.
Beispiele
Das folgende Beispiel veranschaulicht das Erstellen eines StylusPoint.
StylusPointDescription newDescription =
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)
});
int[] propertyValues = { 1800, 1000, 1 };
StylusPoint newStylusPoint = new StylusPoint(100, 100, .5f, newDescription, propertyValues);
Dim newDescription 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 propertyValues As Integer() = {1800, 1000, 1}
Dim newStylusPoint As New StylusPoint(100, 100, 0.5F, newDescription, propertyValues)
Hinweise
pressureFactor muss einen Wert zwischen 0 und 1 (einschließlich) aufweisen. Ein Wert von 0 gibt an, dass kein Druck angewendet wird, während ein Wert von 1 angibt, dass die maximale Druckmenge angewendet wird. Ein Wert von 0,5 gibt an, dass 50% des maximalen Drucks angewendet wird usw.
Gilt für:
StylusPoint(Double, Double, Single, StylusPointDescription, Int32[])
Initialisiert eine neue Instanz der StylusPoint Klasse mit angegebenen (x, y)-Koordinaten, a pressureFactorund zusätzlichen Parametern, die in der StylusPointDescription.
public:
StylusPoint(double x, double y, float pressureFactor, System::Windows::Input::StylusPointDescription ^ stylusPointDescription, cli::array <int> ^ additionalValues);
public StylusPoint(double x, double y, float pressureFactor, System.Windows.Input.StylusPointDescription stylusPointDescription, int[] additionalValues);
new System.Windows.Input.StylusPoint : double * double * single * System.Windows.Input.StylusPointDescription * int[] -> System.Windows.Input.StylusPoint
Public Sub New (x As Double, y As Double, pressureFactor As Single, stylusPointDescription As StylusPointDescription, additionalValues As Integer())
Parameter
- x
- Double
Die x-Koordinate der StylusPoint.
- y
- Double
Die y-Koordinate des StylusPoint.
- pressureFactor
- Single
Die Druckmenge, die auf die StylusPoint.
- stylusPointDescription
- StylusPointDescription
A StylusPointDescription that specifies the additional properties stored in the StylusPoint.
- additionalValues
- Int32[]
Ein Array von 32-Bit-ganzzahlen, die die Werte der in stylusPointDescriptiondefinierten Eigenschaften enthalten.
Ausnahmen
pressureFactor ist kleiner als 0 oder größer als 1.
-oder-
Die Werte, die additionalValues Schaltflächeneigenschaften entsprechen, sind nicht 0 oder 1.
Die Anzahl der Werte in additionalValues stimmt nicht mit der Anzahl der Eigenschaften in stylusPointDescription Minus 3 überein.
Beispiele
Das folgende Beispiel veranschaulicht das Erstellen eines StylusPoint.
StylusPointDescription newDescription =
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)
});
int[] propertyValues = { 1800, 1000, 1 };
StylusPoint newStylusPoint = new StylusPoint(100, 100, .5f, newDescription, propertyValues);
Dim newDescription 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 propertyValues As Integer() = {1800, 1000, 1}
Dim newStylusPoint As New StylusPoint(100, 100, 0.5F, newDescription, propertyValues)