StylusPoint Konstruktorer

Definition

Initierar en ny instans av StylusPoint klassen.

Överlagringar

Name Description
StylusPoint(Double, Double)

Initierar en ny instans av StylusPoint klassen med angivna koordinater (x, y).

StylusPoint(Double, Double, Single)

Initierar en ny instans av StylusPoint klassen med angivna koordinater (x, y) och tryck.

StylusPoint(Double, Double, Single, StylusPointDescription, Int32[])

Initierar en ny instans av StylusPoint klassen med angivna (x, y) koordinater, en pressureFactoroch ytterligare parametrar som anges i StylusPointDescription.

StylusPoint(Double, Double)

Initierar en ny instans av StylusPoint klassen med angivna koordinater (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)

Parametrar

x
Double

X-koordinaten för StylusPoint.

y
Double

Y-koordinaten för StylusPoint.

Exempel

I följande exempel visas hur du skapar en 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)

Gäller för

StylusPoint(Double, Double, Single)

Initierar en ny instans av StylusPoint klassen med angivna koordinater (x, y) och tryck.

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)

Parametrar

x
Double

X-koordinaten för StylusPoint.

y
Double

Y-koordinaten för StylusPoint.

pressureFactor
Single

Mängden tryck som tillämpas på StylusPoint.

Undantag

pressureFactor är mindre än 0 eller större än 1.

Exempel

I följande exempel visas hur du skapar en 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)

Kommentarer

pressureFactor måste ha ett värde mellan 0 och 1, inklusive. Värdet 0 anger att inget tryck tillämpas, medan värdet 1 anger att den maximala tryckmängden tillämpas. Värdet 0,5 anger att 50% av det maximala trycket tillämpas och så vidare.

Gäller för

StylusPoint(Double, Double, Single, StylusPointDescription, Int32[])

Initierar en ny instans av StylusPoint klassen med angivna (x, y) koordinater, en pressureFactoroch ytterligare parametrar som anges i 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())

Parametrar

x
Double

X-koordinaten för StylusPoint.

y
Double

Y-koordinaten för StylusPoint.

pressureFactor
Single

Mängden tryck som tillämpas på StylusPoint.

stylusPointDescription
StylusPointDescription

A StylusPointDescription som anger de ytterligare egenskaper som lagras i StylusPoint.

additionalValues
Int32[]

En matris med 32-bitars signerade heltal som innehåller värdena för egenskaperna som definieras i stylusPointDescription.

Undantag

pressureFactor är mindre än 0 eller större än 1.

-eller-

Värdena i additionalValues som motsvarar knappegenskaperna är inte 0 eller 1.

Antalet värden i additionalValues matchar inte antalet egenskaper i stylusPointDescription minus 3.

Exempel

I följande exempel visas hur du skapar en 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)

Gäller för