IInkAnalyzer::SetStrokeType method

Changes the type of the specified stroke.

Syntax

HRESULT SetStrokeType(
  [in] LONG       lStrokeId,
  [in] StrokeType StrokeType
);

Parameters

lStrokeId [in]

The stroke identifier of the stroke to which to assign StrokeType.

StrokeType [in]

The StrokeType value to assign to the stroke.

Return value

For a description of the return values, see Classes and Interfaces - Ink Analysis.

Remarks

If the stroke's type is the StrokeType value StrokeType_Unclassified, the IInkAnalyzer classifies the stroke during ink analysis. Otherwise, the IInkAnalyzer uses the type set on the stroke.

The IInkAnalyzer does not set the stroke type value as part of ink analysis. To specify or change the stroke type, use IInkAnalyzer::SetStrokeType Method or IInkAnalyzer::SetStrokesType Method.

If a stroke is associated with an IContextNode that is not an unclassified ink node (see IContextNode::GetType), this method moves the stroke to an unclassified ink node that contains strokes of the same language. If no such context node exists, this method creates a new unclassified ink node and adds the stroke to it. An unclassified ink node is an IContextNode that is of type UnclassifiedInk.

If this method moves a stroke from an IContextNode that is not an unclassified ink node, this method also adds the stroke's bounding box to the ink analyzer's dirty region (see IInkAnalyzer::GetDirtyRegion Method).

This method does not move a stroke if the StrokeType parameter matches the stroke's current type.

Setting the stroke type on strokes that are associated with a ContextNode that has NodeTypeAndProperties confirmed will raise an InvalidOperationException.

If the specified stroke is not associated with the IInkAnalyzer, this method returns without updating the IInkAnalyzer.

Requirements

Requirement Value
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

IInkAnalyzer

IInkAnalyzer::GetStrokeType Method

IInkAnalyzer::SetStrokesType Method

Ink Analysis Reference