StylusPoint Construtores

Definição

Inicializa uma nova instância da classe StylusPoint.Initializes a new instance of the StylusPoint class.

Sobrecargas

StylusPoint(Double, Double)

Inicializa uma nova instância da classe StylusPoint usando as coordenadas especificadas (x, y).Initializes a new instance of the StylusPoint class using specified (x, y) coordinates.

StylusPoint(Double, Double, Single)

Inicializa uma nova instância da classe StylusPoint usando as coordenadas (x, y) e a pressão especificadas.Initializes a new instance of the StylusPoint class using specified (x, y) coordinates and pressure.

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

Inicializa uma nova instância da classe StylusPoint usando as coordenadas especificadas (x, y), um pressureFactor e parâmetros adicionais especificados na StylusPointDescription.Initializes a new instance of the StylusPoint class using specified (x, y) coordinates, a pressureFactor, and additional parameters specified in the StylusPointDescription.

StylusPoint(Double, Double)

Inicializa uma nova instância da classe StylusPoint usando as coordenadas especificadas (x, y).Initializes a new instance of the StylusPoint class using specified (x, y) coordinates.

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)

Parâmetros

x
Double

A coordenada x do StylusPoint.The x-coordinate of the StylusPoint.

y
Double

A coordenada y do StylusPoint.The y-coordinate of the StylusPoint.

Exemplos

O exemplo a seguir demonstra como criar um StylusPoint.The following example demonstrates how to create a 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)

StylusPoint(Double, Double, Single)

Inicializa uma nova instância da classe StylusPoint usando as coordenadas (x, y) e a pressão especificadas.Initializes a new instance of the StylusPoint class using specified (x, y) coordinates and pressure.

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)

Parâmetros

x
Double

A coordenada x do StylusPoint.The x-coordinate of the StylusPoint.

y
Double

A coordenada y do StylusPoint.The y-coordinate of the StylusPoint.

pressureFactor
Single

A quantidade de pressão aplicada no StylusPoint.The amount of pressure applied to the StylusPoint.

Exceções

pressureFactor é menor que 0 ou maior que 1.pressureFactor is less than 0 or greater than 1.

Exemplos

O exemplo a seguir demonstra como criar um StylusPoint.The following example demonstrates how to create a 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)

Comentários

pressureFactor deve ter um valor entre 0 e 1, inclusive.pressureFactor must have a value between 0 and 1, inclusive. Um valor de 0 indica que nenhuma pressão é aplicada, enquanto um valor de 1 indica que a quantidade máxima de pressão é aplicada.A value of 0 indicates that no pressure is applied, while a value of 1 indicates that the maximum amount of pressure is applied. Um valor de 0,5 indica que 50% da pressão máxima é aplicada e assim por diante.A value of 0.5 indicates that 50% of the maximum pressure is applied, and so on.

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

Inicializa uma nova instância da classe StylusPoint usando as coordenadas especificadas (x, y), um pressureFactor e parâmetros adicionais especificados na StylusPointDescription.Initializes a new instance of the StylusPoint class using specified (x, y) coordinates, a pressureFactor, and additional parameters specified in the 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

Parâmetros

x
Double

A coordenada x do StylusPoint.The x-coordinate of the StylusPoint.

y
Double

A coordenada y do StylusPoint.The y-coordinate of the StylusPoint.

pressureFactor
Single

A quantidade de pressão aplicada no StylusPoint.The amount of pressure applied to the StylusPoint.

stylusPointDescription
StylusPointDescription

Uma StylusPointDescription que especifica as propriedades adicionais armazenadas no StylusPoint.A StylusPointDescription that specifies the additional properties stored in the StylusPoint.

additionalValues
Int32[]

Uma matriz de inteiros com sinal de 32 bits que contém os valores das propriedades definidas em stylusPointDescription.An array of 32-bit signed integers that contains the values of the properties defined in stylusPointDescription.

Exceções

pressureFactor é menor que 0 ou maior que 1.pressureFactor is less than 0 or greater than 1.

- ou --or- Os valores em additionalValues que correspondem às propriedades do botão não são 0 nem 1.The values in additionalValues that correspond to button properties are not 0 or 1.

O número de valores em additionalValues não corresponde ao número de propriedades em stylusPointDescription menos 3.The number of values in additionalValues does not match the number of properties in stylusPointDescription minus 3.

Exemplos

O exemplo a seguir demonstra como criar um StylusPoint.The following example demonstrates how to create a 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)

Aplica-se a