LineNode - класс
Обновлен: Ноябрь 2007
Represents a ContextNode for a line of words.
Пространство имен: Microsoft.Ink
Сборка: Microsoft.Ink.Analysis (в Microsoft.Ink.Analysis.dll)
Синтаксис
'Декларация
Public NotInheritable Class LineNode _
Inherits ContextNode
'Применение
Dim instance As LineNode
public sealed class LineNode : ContextNode
public ref class LineNode sealed : public ContextNode
public final class LineNode extends ContextNode
public final class LineNode extends ContextNode
Заметки
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()
Graphics panelGraphics = theNotesPanel.CreateGraphics();
Renderer theRenderer = theInkCollector.Renderer;
// Loop through all of the lines
ContextNodeCollection lines =
theInkAnalyzer.FindNodesOfType(Microsoft.Ink.ContextNodeType.Line);
foreach (LineNode line in lines)
{
// Show rotated bounding box in blue
// Convert corners to pixel coordinates
Point[] corners = line.GetRotatedBoundingBox();
theRenderer.InkSpaceToPixel(panelGraphics, ref corners);
// Draw the rectangle
panelGraphics.DrawPolygon(new Pen(Color.Blue), corners);
}
panelGraphics.Dispose();
Иерархия наследования
System.Object
Microsoft.Ink.ContextNode
Microsoft.Ink.LineNode
Потокобезопасность
Любые открытые члены этого типа, объявленные как static (Shared в Visual Basic), являются потокобезопасными. Потокобезопасность членов экземпляров не гарантируется.
Платформы
Windows Vista
Среды .NET Framework и .NET Compact Framework поддерживают не все версии каждой платформы. Поддерживаемые версии перечислены в разделе Требования к системе для .NET Framework.
Сведения о версии
.NET Framework
Поддерживается в версии: 3.0