1 行の単語の ContextNode を表します。
名前空間 : 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
解説
LineNode オブジェクトには、次の型の子を格納できます。
任意の数の InkWordNode オブジェクト。
任意の数の TextWordNode オブジェクト。
InkAnalysis API を使用すると、インク単語およびテキスト単語を格納する LineNode を作成できます。ただし、このような混合ノードはパーサーによって無視され、外部ノードと同様に処理されます。このことは、エンド ユーザーがこの混合ノード上または混合ノードの周囲に書き込んだ場合の、解析によるインク注釈検出の正確さに影響を及ぼします。
例
次の例では、InkAnalyzer、theInkAnalyzer のすべての LineNode オブジェクトをループで処理し、回転された外接する四角形、アセンダ、デセンダ、中線、およびベースラインを示す線を描画します。線は、Panel、theNotesPanel 上に描画されます。このパネルには、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 (Visual Basic では Shared) メンバは、スレッド セーフです。インスタンス メンバの場合は、スレッド セーフであるとは限りません。
プラットフォーム
Windows Vista
.NET Framework および .NET Compact Framework では、各プラットフォームのすべてのバージョンはサポートしていません。サポートされているバージョンについては、「.NET Framework システム要件」を参照してください。
バージョン情報
.NET Framework
サポート対象 : 3.0