Compartir a través de


InkAnalyzerBase.UpdateStrokeData (Método)

Actualización: noviembre 2007

Actualiza los datos de paquete para el trazo especificado.

Espacio de nombres:  System.Windows.Ink.AnalysisCore
Ensamblado:  IACore (en IACore.dll)

Sintaxis

'Declaración
Public Sub UpdateStrokeData ( _
    strokeId As Integer, _
    strokePacketData As Integer(), _
    strokePacketDescription As Guid() _
)
'Uso
Dim instance As InkAnalyzerBase
Dim strokeId As Integer
Dim strokePacketData As Integer()
Dim strokePacketDescription As Guid()

instance.UpdateStrokeData(strokeId, strokePacketData, _
    strokePacketDescription)
public void UpdateStrokeData(
    int strokeId,
    int[] strokePacketData,
    Guid[] strokePacketDescription
)
public:
void UpdateStrokeData(
    int strokeId, 
    array<int>^ strokePacketData, 
    array<Guid>^ strokePacketDescription
)
public void UpdateStrokeData(
    int strokeId,
    int[] strokePacketData,
    Guid[] strokePacketDescription
)
public function UpdateStrokeData(
    strokeId : int, 
    strokePacketData : int[], 
    strokePacketDescription : Guid[]
)

Parámetros

  • strokePacketData
    Tipo: array<System.Int32[]
    Matriz que contiene los datos del paquete del trazo.
  • strokePacketDescription
    Tipo: array<System.Guid[]
    Matriz que contiene los identificadores de las propiedades del paquete.

Comentarios

strokePacketData contiene datos del paquete de todos los puntos del trazo. strokePacketDescription contiene los identificadores únicos globales (GUID) que describen los tipos de datos del paquete incluidos para cada punto del trazo. Para obtener una lista completa de las propiedades del paquete disponibles, vea la clase Microsoft.Ink.PacketProperty.

Este método no actualiza la DirtyRegion del analizador de entrada manuscrita.

Si el trazo especificado no está asociado al analizador de entrada manuscrita, este método termina sin actualizar dicho analizador.

Ejemplos

En el ejemplo siguiente se define un método, theInkAnalyzerBase_UpdateStrokesCacheBase, que controla el evento UpdateStrokesCacheBase de un objeto InkAnalyzerBase. Este método recupera los datos de trazo de un objeto Microsoft.Ink.Ink, theInk. En la práctica, si la aplicación utiliza un objeto Microsoft.Ink.Ink para almacenar los datos de trazo, debería utilizar la clase derivada Microsoft.Ink.InkAnalyzer.

''' <summary>
''' Handles the UpdateStrokesCacheBase event of an InkAnalyzerBase.
''' </summary>
''' <param name="sender">The source of the event.</param>
''' <param name="e">The event data.</param>
''' <remarks>
''' This method converts stroke data to packet data for example only.
''' The InkAnalyzerBase is used when your application is handling packet
''' data. If your application uses stroke data from an Ink object, then
''' you would use InkAnalyzer.
''' </remarks>
Sub theInkAnalyzerBase_UpdateStrokesCacheBase( _
ByVal sender As Object, _
ByVal e As System.Windows.Ink.AnalysisCore.UpdateStrokesCacheBaseEventArgs)
    ' The source is an InkAnalyzerBase.
    Dim theInkAnalyzerBase As System.Windows.Ink.AnalysisCore.InkAnalyzerBase = _
        DirectCast(sender, System.Windows.Ink.AnalysisCore.InkAnalyzerBase)

    ' Add the stroke data to the ink analyzer.
    Dim theStroke As Microsoft.Ink.Stroke
    For Each theStroke In Me.theInk.CreateStrokes(e.GetStrokeIds())
        theInkAnalyzerBase.UpdateStrokeData( _
            theStroke.Id, _
            theStroke.GetPacketData(), _
            theStroke.PacketDescription)
    Next theStroke

End Sub 'theInkAnalyzerBase_UpdateStrokesCacheBase
/// <summary>
/// Handles the UpdateStrokesCacheBase event of an InkAnalyzerBase.
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">The event data.</param>
/// <remarks>
/// This method converts stroke data to packet data for example only.
/// The InkAnalyzerBase is used when your application is handling packet
/// data. If your application uses stroke data from an Ink object, then
/// you would use InkAnalyzer.
/// </remarks>
void theInkAnalyzerBase_UpdateStrokesCacheBase(
    object sender, System.Windows.Ink.AnalysisCore.UpdateStrokesCacheBaseEventArgs e)
{
    // The source is an InkAnalyzerBase.
    System.Windows.Ink.AnalysisCore.InkAnalyzerBase theInkAnalyzerBase =
        sender as System.Windows.Ink.AnalysisCore.InkAnalyzerBase;

    // Add the stroke data to the ink analyzer.
    foreach (Microsoft.Ink.Stroke theStroke
        in this.theInk.CreateStrokes(e.GetStrokeIds()))
    {
        theInkAnalyzerBase.UpdateStrokeData(
            theStroke.Id, theStroke.GetPacketData(),
            theStroke.PacketDescription);
    }
}

Plataformas

Windows Vista, Windows XP SP2, Windows Server 2003

.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

InkAnalyzerBase (Clase)

InkAnalyzerBase (Miembros)

System.Windows.Ink.AnalysisCore (Espacio de nombres)

InkAnalyzerBase.AddStroke

InkAnalyzerBase.AddStrokes

InkAnalyzerBase.ClearStrokeData

InkAnalyzerBase.UpdateStrokesData

InkAnalyzerBase.UpdateStrokesCacheBase