Condividi tramite


Metodo Stroke.GetPoints (Int32, Int32)

Aggiornamento: novembre 2007

Restituisce un intervallo specifico delle strutture Point che costituiscono l'oggetto Stroke.

Spazio dei nomi:  Microsoft.Ink
Assembly:  Microsoft.Ink (in Microsoft.Ink.dll)

Sintassi

'Dichiarazione
Public Function GetPoints ( _
    index As Integer, _
    count As Integer _
) As Point()
'Utilizzo
Dim instance As Stroke
Dim index As Integer
Dim count As Integer
Dim returnValue As Point()

returnValue = instance.GetPoints(index, _
    count)
public Point[] GetPoints(
    int index,
    int count
)
public:
array<Point>^ GetPoints(
    int index, 
    int count
)
public Point[] GetPoints(
    int index,
    int count
)
public function GetPoints(
    index : int, 
    count : int
) : Point[]

Parametri

  • index
    Tipo: System.Int32
    Indice in base zero iniziale all'interno della matrice di strutture Point che costituiscono l'oggetto Stroke.

Valore restituito

Tipo: array<System.Drawing.Point[]
Restituisce una matrice di strutture Point che costituiscono l'oggetto Stroke.

Esempi

In questo esempio, viene esaminato ogni oggetto Stroke selezionato di un oggetto InkOverlay. Se l'oggetto Stroke contiene almeno 90 pacchetti, si ottengono 50 oggetti Point (iniziando dall'oggetto Point in posizione 39) dell'oggetto Stroke che vengono utilizzati per creare un nuovo oggetto Stroke. Il nuovo oggetto Stroke viene quindi spostato di 200 unità HIMETRIC nelle direzioni X e Y.

For Each S As Stroke In mInkOverlay.Selection
    If S.PacketCount >= 90 Then
        Dim sPts() As Point = S.GetPoints(39, 50)
        Dim newStroke As Stroke = S.Ink.CreateStroke(sPts)
        newStroke.Move(200, 200)
    End If
Next
foreach (Stroke S in mInkOverlay.Selection)
{
    if (S.PacketCount >= 90)
    {
        Point[] sPts = S.GetPoints(39, 50);
        Stroke newStroke = S.Ink.CreateStroke(sPts);
        newStroke.Move(200, 200);
    }
}

Piattaforme

Windows Vista

.NET Framework e .NET Compact Framework non supportano tutte le versioni di ciascuna piattaforma. Per un elenco delle versioni supportate, vedere Requisiti di sistema di .NET Framework.

Informazioni sulla versione

.NET Framework

Supportato in: 3.0

Vedere anche

Riferimenti

Stroke Classe

Membri Stroke

Overload GetPoints

Spazio dei nomi Microsoft.Ink

Stroke.GetPoint