次の方法で共有


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 を更新しません。

指定したストロークが、インク アナライザに関連付けられていない場合、このメソッドはインク アナライザを更新せずに終了します。

次の例では、InkAnalyzerBaseUpdateStrokesCacheBase イベントを処理する theInkAnalyzerBase_UpdateStrokesCacheBase メソッドを定義します。このメソッドは、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