IInkAnalyzer::AddStrokeToCustomRecognizer method
Adds stroke data for a single stroke to a custom recognizer node.
Syntax
HRESULT AddStrokeToCustomRecognizer(
[in] ULONG ulStrokeId,
[in] ULONG ulStrokePacketDataCount,
[in] LONG *plStrokePacketData,
[in] ULONG ulStrokePacketDescriptionCount,
[in] GUID *pStrokePacketDescriptionGuids,
[in] IContextNode *pCustomRecognizer,
[out] IContextNode **ppContextNodeStrokeAddedTo
);
Parameters
-
ulStrokeId [in]
-
The identifier for the stroke to add.
-
ulStrokePacketDataCount [in]
-
The number of packets in the stroke.
-
plStrokePacketData [in]
-
An array containing the packet data for the stroke.
-
ulStrokePacketDescriptionCount [in]
-
The number of packet properties in each packet.
-
pStrokePacketDescriptionGuids [in]
-
An array containing the packet property identifiers.
-
pCustomRecognizer [in]
-
The IContextNode of type CustomRecognizer to which to add the stroke.
-
ppContextNodeStrokeAddedTo [out]
-
The IContextNode to which the ink analyzer added the stroke.
Return value
For a description of the return values, see Classes and Interfaces - Ink Analysis.
Remarks
Caution
To avoid a memory leak, call IUnknown::Release on ppContextNodeStrokeAddedTo when you no longer need to use the object.
When ppContextNodeStrokeAddedTo is NULL, it indicates that the caller is not interested in the return value from the method.
The IInkAnalyzer adds the stroke to an IContextNode of type CustomRecognizer (see Context Node Types). This node is in the root node's subnode collection (see IInkAnalyzer::GetRootNode Method and IContextNode::GetSubNodes methods).
The IInkAnalyzer assigns the culture identifier of the active input thread to the stroke and adds the stroke to the first UnclassifiedInk node under the CustomRecognizer node. If no UnclassifiedInk node exists, it is created. If the IInkAnalysisRecognizer associated with the CustomRecognizer node does not support the culture identifier, the IInkAnalyzer continues analyzing and generates an IAnalysisWarning warning. This warning has an AnalysisWarningCode value of AnalysisWarningCode_LanguageIdNotRespected.
plStrokePacketData contains packet data for all of the points in the stroke. pStrokePacketDescriptionGuids contains the globally unique identifiers (GUIDs) that describe the types of packet data included for each point in each stroke. For a complete list of available packet properties, see PacketPropertyGuids Constants.
This method expands the dirty region to the union of the region's current value and the bounding box of the added stroke.
The IInkAnalyzer returns an HRESULT of E_INVALIDARG under the following circumstances.
- The IInkAnalyzer already contains a stroke with the same identifier as the stroke to be added.
- The pCustomRecognizer parameter contains a custom recognizer node that is associated with a different IInkAnalyzer object.
- The pCustomRecognizer parameter contains an IContextNode that is not of type CustomRecognizer.
Requirements
Requirement | Value |
---|---|
Minimum supported client |
Windows XP Tablet PC Edition [desktop apps only] |
Minimum supported server |
None supported |
Header |
|
DLL |
|