LineNode Class
Represents a ContextNode for a line of words.
Assembly: Microsoft.Ink.Analysis (in Microsoft.Ink.Analysis.dll)
A LineNode object can contain the following types of children:
Any number of InkWordNode objects.
Any number of TextWordNode objects.
Ihe InkAnalysis API allows you to create a LineNode that contains ink words and text words. However, the parser will ignore these mixed nodes and will treat them like foreign nodes. This will have impact the parsing accuracy of detecting ink annotations when the end user writes on or around this mixed node.
The following example loops through all LineNode objects from an InkAnalyzer, theInkAnalyzer, and then draws lines that show the rotated bounding rectangle, the ascender, the descender, the midline, and the baseline. The lines are drawn on a Panel, theNotesPanel, that has an InkCollector, theInkCollector.
Dim panelGraphics As Graphics = theNotesPanel.CreateGraphics() Dim theRenderer As Renderer = theInkCollector.Renderer ' Loop through all of the lines Dim lines As ContextNodeCollection = _ theInkAnalyzer.FindNodesOfType(Microsoft.Ink.ContextNodeType.Line) For Each line As LineNode In lines ' Show rotated bounding box in blue ' Convert corners to pixel coordinates Dim corners As Point() = line.GetRotatedBoundingBox() theRenderer.InkSpaceToPixel(panelGraphics, corners) ' Draw the rectangle panelGraphics.DrawPolygon(New Pen(Color.Blue), corners) Next line panelGraphics.Dispose()
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.