Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
AddStroke Method
Collapse the table of content
Expand the table of content

IInkAnalyzer::AddStroke method

Adds stroke data for a single stroke to the IInkAnalyzer and assigns the active input thread's culture identifier to the stroke.

Syntax


HRESULT AddStroke(
  [in]  LONG         lStrokeId,
  [in]  ULONG        ulStrokePacketDataCount,
  [in]  LONG         *plStrokePacketData,
  [in]  ULONG        ulStrokePacketDescriptionCount,
  [in]  GUID         *pStrokePacketDescriptionGuids,
  [out] IContextNode **ppContextNodeStrokeAddedTo
);

Parameters

lStrokeId [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.

ppContextNodeStrokeAddedTo [out]

A pointer to the IContextNode to which the IInkAnalyzer 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 UnclassifiedInk (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 context node under the ink analyzer's root node that contains strokes with the same culture identifier. If the ink analyzer does not have a node with the same culture identifier, it creates a new UnclassifiedInk context node under its root node and adds the stroke to the new UnclassifiedInk context node.

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 the 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.

If the IInkAnalyzer already contains a stroke with the same stroke identifier, the IInkAnalyzer returns an HRESULT of E_INVALIDARG.

Requirements

Minimum supported client

Windows XP Tablet PC Edition [desktop apps only]

Minimum supported server

None supported

Header

IACom.h (also requires IACom_i.c)

DLL

IACom.dll

See also

InkAnalyzer
IInkAnalyzer::AddStrokeForLanguage Method
IInkAnalyzer::AddStrokes Method
IInkAnalyzer::AddStrokesForLanguage Method
IInkAnalyzer::RemoveStroke Method
IInkAnalyzer::RemoveStrokes Method
Ink Analysis Reference

 

 

Community Additions

ADD
Show:
© 2015 Microsoft