Freigeben über


InkAnalyzer.AddStrokesToCustomRecognizer Method

Adds stroke data for multiple strokes to a custom recognizer node.

Namespace: Microsoft.Ink
Assembly: Microsoft.Ink.Analysis (in microsoft.ink.analysis.dll)

Syntax

'Declaration
Public Function AddStrokesToCustomRecognizer ( _
    strokes As Strokes, _
    customRecognizer As CustomRecognizerNode _
) As ContextNode
'Usage
Dim instance As InkAnalyzer
Dim strokes As Strokes
Dim customRecognizer As CustomRecognizerNode
Dim returnValue As ContextNode

returnValue = instance.AddStrokesToCustomRecognizer(strokes, customRecognizer)
public ContextNode AddStrokesToCustomRecognizer (
    Strokes strokes,
    CustomRecognizerNode customRecognizer
)
public:
ContextNode^ AddStrokesToCustomRecognizer (
    Strokes^ strokes, 
    CustomRecognizerNode^ customRecognizer
)
public ContextNode AddStrokesToCustomRecognizer (
    Strokes strokes, 
    CustomRecognizerNode customRecognizer
)
public function AddStrokesToCustomRecognizer (
    strokes : Strokes, 
    customRecognizer : CustomRecognizerNode
) : ContextNode
Not applicable.

Parameters

  • customRecognizer
    The custom recognizer node to which the strokes are added.

Return Value

The context node to which the ink analyzer added the strokes.

Remarks

The InkAnalyzer adds the strokes to a ContextNode that has a Type property value of UnclassifiedInk.

During analysis the ink analyzer assigns the culture identifier of the active input thread to the stroke and adds the stroke to the first unclassified ink node under the ink recognizer. If no unclassified node exists, it is created. If the custom recognizer does not support the culture identifier, the ink analyzer continues analyzing and generates an AnalysisWarning warning. This warning has its WarningCode property set to the AnalysisWarningCode value of LanguageIdNotRespected.

Only strokes with the same packet descriptions can be added in a single call to AddStrokes.

This method expands the DirtyRegion to the union of the region's current value and the bounding box of the added strokes.

The InkAnalyzer throws an exception under the following circumstances.

  • The InkAnalyzer already contains a stroke with the same identifier as one of the strokes to be added.

  • The customRecognizer parameter contains a ContextNode that is associated with a different InkAnalyzer object.

  • The customRecognizer parameter contains a ContextNode that does not have a Type property value of CustomRecognizer.

Example

This example shows an excerpt from an event handler for the InkAdded event of an Ink object. The strokes are added to the CustomRecognizerNode, theCustomRecognizerNode.

' Add the strokes to the specified CustomRecognizerNode.
Me.theInkAnalyzer.AddStrokesToCustomRecognizer( _
    Me.theInk.CreateStrokes(e.StrokeIds), Me.theCustomRecognizerNode)
// Add the strokes to the specified CustomRecognizerNode.
this.theInkAnalyzer.AddStrokesToCustomRecognizer(
    this.theInk.CreateStrokes(e.StrokeIds),
    this.theCustomRecognizerNode);

Platforms

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

Version Information

.NET Framework

Supported in: 3.0

See Also

Reference

InkAnalyzer Class
InkAnalyzer Members
Microsoft.Ink Namespace