StylusPoint Constructors
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.
Initialiseert een nieuw exemplaar van de StylusPoint klasse.
Overloads
| Name | Description |
|---|---|
| StylusPoint(Double, Double) |
Initialiseert een nieuw exemplaar van de StylusPoint klasse met behulp van opgegeven coördinaten (x, y). |
| StylusPoint(Double, Double, Single) |
Initialiseert een nieuwe instantie van de StylusPoint klasse met behulp van opgegeven coördinaten (x, y) en druk. |
| StylusPoint(Double, Double, Single, StylusPointDescription, Int32[]) |
Initialiseert een nieuw exemplaar van de StylusPoint klasse met behulp van opgegeven (x, y) coördinaten, een |
StylusPoint(Double, Double)
Initialiseert een nieuw exemplaar van de StylusPoint klasse met behulp van opgegeven coördinaten (x, y).
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)
Parameters
- x
- Double
De x-coördinaat van de StylusPoint.
- y
- Double
De y-coördinaat van de StylusPoint.
Voorbeelden
In het volgende voorbeeld ziet u hoe u een 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)
Van toepassing op
StylusPoint(Double, Double, Single)
Initialiseert een nieuwe instantie van de StylusPoint klasse met behulp van opgegeven coördinaten (x, y) en druk.
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)
Parameters
- x
- Double
De x-coördinaat van de StylusPoint.
- y
- Double
De y-coördinaat van de StylusPoint.
- pressureFactor
- Single
De druk die op de StylusPoint.
Uitzonderingen
pressureFactor is kleiner dan 0 of groter dan 1.
Voorbeelden
In het volgende voorbeeld ziet u hoe u een 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)
Opmerkingen
pressureFactor moet een waarde hebben tussen 0 en 1, inclusief. Een waarde van 0 geeft aan dat er geen druk wordt toegepast, terwijl een waarde van 1 aangeeft dat de maximale druk wordt toegepast. Een waarde van 0,5 geeft aan dat 50% van de maximale druk wordt toegepast, enzovoort.
Van toepassing op
StylusPoint(Double, Double, Single, StylusPointDescription, Int32[])
Initialiseert een nieuw exemplaar van de StylusPoint klasse met behulp van opgegeven (x, y) coördinaten, een pressureFactoren aanvullende parameters die zijn opgegeven in de 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())
Parameters
- x
- Double
De x-coördinaat van de StylusPoint.
- y
- Double
De y-coördinaat van de StylusPoint.
- pressureFactor
- Single
De druk die op de StylusPoint.
- stylusPointDescription
- StylusPointDescription
Een StylusPointDescription die de aanvullende eigenschappen specificeert die zijn opgeslagen in de StylusPoint.
- additionalValues
- Int32[]
Een matrix van 32-bits ondertekende gehele getallen die de waarden van de eigenschappen bevatten die zijn gedefinieerd in stylusPointDescription.
Uitzonderingen
pressureFactor is kleiner dan 0 of groter dan 1.
– of –
De waarden in additionalValues die overeenkomen met knopeigenschappen zijn niet 0 of 1.
Het aantal waarden in additionalValues komt niet overeen met het aantal eigenschappen in stylusPointDescription min 3.
Voorbeelden
In het volgende voorbeeld ziet u hoe u een 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)