Compartir a través de


Stroke.GetPoint (Método)

Actualización: noviembre 2007

Devuelve la estructura Point en el índice especificado en un objeto Stroke.

Espacio de nombres:  Microsoft.Ink
Ensamblado:  Microsoft.Ink (en Microsoft.Ink.dll)

Sintaxis

'Declaración
Public Function GetPoint ( _
    index As Integer _
) As Point
'Uso
Dim instance As Stroke
Dim index As Integer
Dim returnValue As Point

returnValue = instance.GetPoint(index)
public Point GetPoint(
    int index
)
public:
Point GetPoint(
    int index
)
public Point GetPoint(
    int index
)
public function GetPoint(
    index : int
) : Point

Parámetros

  • index
    Tipo: System.Int32
    El índice de base cero de la estructura Point que se va a devolver.

Valor devuelto

Tipo: System.Drawing.Point
Devuelve la estructura Point en el índice especificado en el objeto Stroke.

Ejemplos

En este ejemplo de C# se devuelve un punto interpolado de un objeto Stroke, theStroke, determinado como un valor de índice de punto flotante (Float).

private Point LocatePoint(Stroke theStroke, float theFIndex)
{
    Point ptResult = theStroke.GetPoint((int)theFIndex);
    float theFraction = theFIndex - (int)theFIndex;
    if (theFraction > 0.0f)
    {
        Point ptDelta = theStroke.GetPoint((int)theFIndex + 1);
        ptResult.X += (int)((ptDelta.X - ptResult.X) * theFraction);
        ptResult.Y += (int)((ptDelta.Y - ptResult.Y) * theFraction);
     }
    return ptResult;
}

En este ejemplo de Microsoft Visual Basic .NET se devuelve un punto interpolado de un objeto Stroke, theStroke, determinado como un valor de índice de punto flotante (Float).

Private Function LocatePoint( _
ByVal theStroke As Stroke, ByVal theFIndex As Single) As Point
    Dim theIndex As Integer = Math.Floor(theFIndex)
    Dim theFraction As Single = theFIndex - theIndex
    Dim ptResult As Point = theStroke.GetPoint(theIndex)
    If theFraction > 0.0 Then
        Dim ptDelta As Point = theStroke.GetPoint(theIndex + 1)
        ptResult.X += CInt((ptDelta.X - ptResult.X) * theFraction)
        ptResult.Y += CInt((ptDelta.Y - ptResult.Y) * theFraction)
    End If
    Return ptResult
End Function

Plataformas

Windows Vista

.NET Framework y .NET Compact Framework no admiten todas las versiones de cada plataforma. Para obtener una lista de las versiones compatibles, vea Requisitos de sistema de .NET Framework.

Información de versión

.NET Framework

Compatible con: 3.0

Vea también

Referencia

Stroke (Clase)

Stroke (Miembros)

Microsoft.Ink (Espacio de nombres)

Stroke.GetPoints