InkWordNode 클래스
업데이트: 2007년 11월
인식 가능한 단어를 형성하는 논리적 그룹화를 구성하는 스트로크 컬렉션에 대한 ContextNode를 나타냅니다.
네임스페이스: System.Windows.Ink
어셈블리: IAWinFX(IAWinFX.dll)
구문
‘선언
Public NotInheritable Class InkWordNode _
Inherits ContextNode
‘사용 방법
Dim instance As InkWordNode
public sealed class InkWordNode : ContextNode
public ref class InkWordNode sealed : public ContextNode
public final class InkWordNode extends ContextNode
public final class InkWordNode extends ContextNode
설명
InkWordNode 개체에는 자식이 포함될 수 없습니다.
예제
다음 예제에서는 InkAnalyzer인 theInkAnalyzer에서 모든 InkWordNode 개체를 반복하여 회전된 경계 사각형, 어센더 선 ascenderLine, 디센더 선 descenderLine, 중간선 및 기준선을 보여 주는 선을 그립니다. 선은 InkCanvas인 theInkCanvas에 그려집니다.
' Loop through all of the ink words
Dim inkWords As ContextNodeCollection = _
theInkAnalyzer.FindNodesOfType(ContextNodeType.InkWord)
Dim inkWord As InkWordNode
For Each inkWord In inkWords
' Show rotated bounding box in blue
Dim rotatedBounds As New Polygon()
rotatedBounds.Points = inkWord.GetRotatedBoundingBox()
rotatedBounds.Stroke = Brushes.Blue
Me.theInkCanvas.Children.Add(rotatedBounds)
' Show the ascender line in green
Dim ascenderLine As New Polyline()
ascenderLine.Points = inkWord.GetAscender()
ascenderLine.Stroke = Brushes.Green
Me.theInkCanvas.Children.Add(ascenderLine)
' Show the baseline in purple
Dim baseline As New Polyline()
baseline.Points = inkWord.GetBaseline()
baseline.Stroke = Brushes.Purple
theInkCanvas.Children.Add(baseline)
' Show the descender line in yellow
Dim descenderLine As New Polyline()
descenderLine.Points = inkWord.GetDescender()
descenderLine.Stroke = Brushes.Yellow
theInkCanvas.Children.Add(descenderLine)
' Show the descender line in brown
Dim midline As New Polyline()
midline.Points = inkWord.GetMidline()
midline.Stroke = Brushes.Brown
theInkCanvas.Children.Add(midline)
Next inkWord
// Loop through all of the ink words
ContextNodeCollection inkWords =
theInkAnalyzer.FindNodesOfType(ContextNodeType.InkWord);
foreach (InkWordNode inkWord in inkWords)
{
// Show rotated bounding box in blue
Polygon rotatedBounds = new Polygon();
rotatedBounds.Points = inkWord.GetRotatedBoundingBox();
rotatedBounds.Stroke = Brushes.Blue;
this.theInkCanvas.Children.Add(rotatedBounds);
// Show the ascender line in green
Polyline ascenderLine = new Polyline();
ascenderLine.Points = inkWord.GetAscender();
ascenderLine.Stroke = Brushes.Green;
this.theInkCanvas.Children.Add(ascenderLine);
// Show the baseline in purple
Polyline baseline = new Polyline();
baseline.Points = inkWord.GetBaseline();
baseline.Stroke = Brushes.Purple;
theInkCanvas.Children.Add(baseline);
// Show the descender line in yellow
Polyline descenderLine = new Polyline();
descenderLine.Points = inkWord.GetDescender();
descenderLine.Stroke = Brushes.Yellow;
theInkCanvas.Children.Add(descenderLine);
// Show the midline in brown
Polyline midline = new Polyline();
midline.Points = inkWord.GetMidline();
midline.Stroke = Brushes.Brown;
theInkCanvas.Children.Add(midline);
}
상속 계층 구조
System.Object
System.Windows.Ink.ContextNode
System.Windows.Ink.InkWordNode
스레드로부터의 안전성
이 형식의 모든 공용 static(Visual Basic의 경우 Shared) 멤버는 스레드로부터 안전합니다. 인터페이스 멤버는 스레드로부터 안전하지 않습니다.
플랫폼
Windows Vista
.NET Framework 및 .NET Compact Framework에서 모든 플랫폼의 전체 버전을 지원하지는 않습니다. 지원되는 버전의 목록을 보려면 .NET Framework 시스템 요구 사항을 참조하십시오.
버전 정보
.NET Framework
3.0에서 지원