Sdílet prostřednictvím


AnalysisHintNode.Guide Property

Gets or sets the recognizer guide that the InkAnalyzer uses to analyze ink within this area.

Namespace:  Microsoft.Ink
Assembly:  Microsoft.Ink.Analysis (in Microsoft.Ink.Analysis.dll)

Syntax

'Declaration
Public Property Guide As RecognizerGuide
'Usage
Dim instance As AnalysisHintNode 
Dim value As RecognizerGuide 

value = instance.Guide

instance.Guide = value
public RecognizerGuide Guide { get; set; }
public:
property RecognizerGuide Guide {
    RecognizerGuide get ();
    void set (RecognizerGuide value);
}
public function get Guide () : RecognizerGuide 
public function set Guide (value : RecognizerGuide)

Property Value

Type: Microsoft.Ink.RecognizerGuide
The recognizer guide that the InkAnalyzer uses to analyze ink within this area. The default is a RecognizerGuide, where its Rows, Columns, and Midline properties are 0, and its DrawnBox and WritingBox properties are empty rectangles.

Remarks

Note

If the Microsoft.Ink.InkRecognizer that the InkAnalyzer uses for handwriting recognition does not support guides, the InkAnalyzer ignores the guide. For more information about the capabilities that an InkRecognizer supports, see InkRecognizerBase.Capabilities.

All coordinates of the RecognizerGuide are in ink-space coordinates and are relative to the top left corner of the hint. For a global hint, the guide is not translated; it uses the Ink object's coordinate system. For more information about using a guide to improve handwriting recognition, see RecognizerGuide.

During analysis, if the ink recognizer applied to the strokes does not support a guide, the ink analyzer generates an AnalysisWarning with its WarningCode property set to the Microsoft.Ink.AnalysisWarningCode value of GuideNotSupported.

To remove a guide from a hint, call the hint's RemovePropertyData method with propertyDataId set to PropertyGuidsForAnalysisHintsBase.Guide. The guide can also be removed (set to default) by calling ClearGuide method.

Examples

This example creates an AnalysisHintNode, theAnalysisHint, for the InkAnalyzer, theInkAnalyzerWithHint, and makes theAnalysisHint a global hint. It then sets the Guide and Name properties on the hint.

' Add a new, global analysis hint to theInkAnalyzerWithHint. 
Dim theAnalysisHint As Microsoft.Ink.AnalysisHintNode = _
    Me.theInkAnalyzerWithHint.CreateAnalysisHint()
theAnalysisHint.Location.MakeInfinite()

theAnalysisHint.Guide = New RecognizerGuide(1, 0, _
    Me.theMidlineHeightInHimetric, _
    Rectangle.Inflate(Me.theGuideBoxInHimetric, 50, 50), _
    Me.theGuideBoxInHimetric)
theAnalysisHint.Name = "Recognizer Guide"
// Add a new, global analysis hint to theInkAnalyzerWithHint.
Microsoft.Ink.AnalysisHintNode theAnalysisHint =
    this.theInkAnalyzerWithHint.CreateAnalysisHint();
theAnalysisHint.Location.MakeInfinite();

theAnalysisHint.Guide = new RecognizerGuide(1, 0,
    this.theMidlineHeightInHimetric,
    Rectangle.Inflate(this.theGuideBoxInHimetric, 50, 50),
    this.theGuideBoxInHimetric);
theAnalysisHint.Name = "Recognizer Guide";

Platforms

Windows 7, Windows Vista, Windows Server 2008 R2, Windows Server 2008

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Version Information

.NET Framework

Supported in: 3.0

See Also

Reference

AnalysisHintNode Class

AnalysisHintNode Members

Microsoft.Ink Namespace

Microsoft.Ink.RecognizerGuide