업데이트: 2007년 11월
알려진 Strokes 컬렉션이 들어 있으며 인식기에서 대체 항목을 제공할 수 있는 가장 작은 Strokes 컬렉션을 반환합니다.
네임스페이스: Microsoft.Ink
어셈블리: Microsoft.Ink(Microsoft.Ink.dll)
구문
‘선언
Public Function GetStrokesFromStrokeRanges ( _
s As Strokes _
) As Strokes
‘사용 방법
Dim instance As RecognitionAlternate
Dim s As Strokes
Dim returnValue As Strokes
returnValue = instance.GetStrokesFromStrokeRanges(s)
public Strokes GetStrokesFromStrokeRanges(
Strokes s
)
public:
Strokes^ GetStrokesFromStrokeRanges(
Strokes^ s
)
public Strokes GetStrokesFromStrokeRanges(
Strokes s
)
public function GetStrokesFromStrokeRanges(
s : Strokes
) : Strokes
매개 변수
- s
형식: Microsoft.Ink.Strokes
이 컬렉션이 들어 있는 인식 결과 대체 항목의 가장 작은 Strokes 컬렉션을 찾는 데 사용할 Strokes 컬렉션입니다.
반환 값
형식: Microsoft.Ink.Strokes
알려진 Strokes 컬렉션이 들어 있으며 인식기에서 대체 항목을 제공할 수 있는 가장 작은 Strokes 컬렉션을 반환합니다.
설명
반환된 Strokes 컬렉션은 입력 컬렉션과 일치할 수도 있고, 입력 컬렉션이 모든 입력 스트로크를 포함하는 가장 작은 인식 결과 중 일부와 일치하는 경우 반환된 컬렉션이 더 클 수도 있습니다.
이 메서드는 한 번 클릭하여 단어를 선택할 때 가장 유용합니다. 예를 들어 클릭한 단어를 구성하는 스트로크를 반환하려면 Stroke 개체를 클릭하고 Ink 개체의 HitTest 메서드를 호출하여 해당 스트로크를 반환한 다음 GetStrokesFromStrokeRanges를 호출합니다.
스트로크 범위는 Ink 개체가 수정되기 전까지 유효합니다.
예제
이 C# 예제에서는 Form1의 그리기 공간에서 ptMouseDown 위치에 마우스를 클릭하여 선택한 Strokes 컬렉션을 포함하는 가장 작은 RecognitionAlternate 개체 집합에 연결된 Strokes 컬렉션을 반환합니다. 이미 잉크 스트로크가 인식되어 RecognitionResult 개체인 theRecognitionResult에 결과가 저장되어 있습니다.
[C#]
Strokes hitStrokes;
Strokes altStrokes;
// Convert the mouse down to ink space coordinates
theInkCollector.Renderer.PixelToInkSpace(this.CreateGraphics(), ref ptMouseDown);
// Get the strokes hit by the mouse (within a radius of 100 HIMETRIC)
hitStrokes = theInkCollector.Ink.HitTest(ptMouseDown, 100);
if (hitStrokes.Count > 0)
{
altStrokes = theRecognitionResult.TopAlternate.GetStrokesFromStrokeRanges(hitStrokes);
//...
}
이 Visual Basic .NET 예제에서는 Form1의 그리기 공간에서 ptMouseDown 위치에 마우스를 클릭하여 선택한 Strokes 컬렉션을 포함하는 가장 작은 RecognitionAlternate 개체 집합에 연결된 Strokes 컬렉션을 반환합니다. 이미 잉크 스트로크가 인식되어 RecognitionResult 개체인 theRecognitionResult에 결과가 저장되어 있습니다.
[Visual Basic]
Dim hitStrokes As Strokes
Dim altStrokes As Strokes
' Convert the mouse down to ink space coordinates
theInkCollector.Renderer.PixelToInkSpace( _
Me.CreateGraphics(), ptMouseDown)
' Get the strokes hit by the mouse (within a radius of 100 HIMETRIC)
hitStrokes = theInkCollector.Ink.HitTest(ptMouseDown, 100)
If hitStrokes.Count > 0 Then
altStrokes = theRecognitionResult.TopAlternate.GetStrokesFromStrokeRanges( _
hitStrokes)
'...
End If
플랫폼
Windows Vista
.NET Framework 및 .NET Compact Framework에서 모든 플랫폼의 전체 버전을 지원하지는 않습니다. 지원되는 버전의 목록을 보려면 .NET Framework 시스템 요구 사항을 참조하십시오.
버전 정보
.NET Framework
3.0에서 지원
참고 항목
참조
RecognitionAlternate.GetStrokesFromTextRange