InkAnalyzerBase.UpdateStrokeData 方法

更新指定笔画的数据包数据。

命名空间:  System.Windows.Ink.AnalysisCore
程序集:  IACore(在 IACore.dll 中)

语法

声明
Public Sub UpdateStrokeData ( _
    strokeId As Integer, _
    strokePacketData As Integer(), _
    strokePacketDescription As Guid() _
)
用法
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[]
)

参数

  • strokePacketData
    类型:array<System.Int32[]
    包含笔画数据包数据的数组。
  • strokePacketDescription
    类型:array<System.Guid[]
    包含数据包属性标识符的数组。

备注

strokePacketData 包含笔画中所有点的数据包数据。strokePacketDescription 包含用于描述笔画中每个点所包含的数据包数据类型的全局唯一标识符 (GUID)。有关可用数据包属性的完整列表,请参见 Microsoft.Ink.PacketProperty 类。

此方法不更新墨迹分析器的 DirtyRegion

如果指定笔画不与墨迹分析器相关联,则此方法返回但不更新墨迹分析器。

示例

下面的示例定义 theInkAnalyzerBase_UpdateStrokesCacheBase 方法,该方法处理 InkAnalyzerBaseUpdateStrokesCacheBase 事件。此方法从 Microsoft.Ink.Ink 对象 theInk 中检索笔画数据。实际上,如果应用程序要使用 Microsoft.Ink.Ink 对象存储笔画数据,则应用程序应使用派生的 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);
    }
}

平台

Windows Vista, Windows XP SP2, Windows Server 2003

.NET Framework 和 .NET Compact Framework 并不是对每个平台的所有版本都提供支持。有关支持的版本的列表,请参见.NET Framework 系统要求

版本信息

.NET Framework

受以下版本支持:3.0

另请参见

参考

InkAnalyzerBase 类

InkAnalyzerBase 成员

System.Windows.Ink.AnalysisCore 命名空间

InkAnalyzerBase.AddStroke

InkAnalyzerBase.AddStrokes

InkAnalyzerBase.ClearStrokeData

InkAnalyzerBase.UpdateStrokesData

InkAnalyzerBase.UpdateStrokesCacheBase