This documentation is archived and is not being maintained.

LineNode Class

Represents a ContextNode for a line of words.

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

'Declaration
Public NotInheritable Class LineNode _
	Inherits ContextNode
'Usage
Dim instance As LineNode

A LineNode object can contain the following types of children:

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()

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

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.

.NET Framework

Supported in: 3.0
Show: