업데이트: 2007년 11월
인식기에서 알려진 Strokes 컬렉션이 들어 있는 대체 항목을 반환할 수 있는 인식된 텍스트의 가장 작은 범위를 확인합니다.
네임스페이스: Microsoft.Ink
어셈블리: Microsoft.Ink(Microsoft.Ink.dll)
구문
‘선언
Public Sub GetTextRangeFromStrokes ( _
s As Strokes, _
ByRef selectionStart As Integer, _
ByRef selectionLength As Integer _
)
‘사용 방법
Dim instance As RecognitionAlternate
Dim s As Strokes
Dim selectionStart As Integer
Dim selectionLength As Integer
instance.GetTextRangeFromStrokes(s, selectionStart, _
selectionLength)
public void GetTextRangeFromStrokes(
Strokes s,
ref int selectionStart,
ref int selectionLength
)
public:
void GetTextRangeFromStrokes(
Strokes^ s,
int% selectionStart,
int% selectionLength
)
public void GetTextRangeFromStrokes(
Strokes s,
/** @ref */int selectionStart,
/** @ref */int selectionLength
)
public function GetTextRangeFromStrokes(
s : Strokes,
selectionStart : int,
selectionLength : int
)
매개 변수
- s
형식: Microsoft.Ink.Strokes
대체 항목에 들어 있는 Strokes 컬렉션입니다.
- selectionStart
형식: System.Int32%
인식된 텍스트 범위의 시작 위치입니다.
- selectionLength
형식: System.Int32%
인식된 텍스트 범위의 길이입니다.
설명
이 메서드를 사용하면 Stroke 개체의 지정된 범위에 해당하는 텍스트를 검색할 수 있습니다. 예를 들어 스트로크 9개(글자마다 하나, 각 단어에 3개)를 사용하여 그린 "how are you"라는 Strokes 컬렉션이 있다고 가정해 봅니다. 문자 "e" 및 "y"에 해당하는 6번째 및 7번째 스트로크로 구성된 컬렉션을 전달하면 반환되는 텍스트 범위는 "are you"가 들어 있는 대체 항목과 일치하고 선택 영역의 시작 부분과 길이가 이 부분 문자열과 일치합니다.
예제
이 C# 예제에서는 RecognitionResult 개체인 theRecognitionResult의 TopAlternate 속성에 대해 ,GetTextRangeFromStrokes 메서드를 호출하고 스트로크 내에서 theStrokes의 인식 결과를 구성하는 Strokes 컬렉션을 전달합니다.
[C#]
// . . .
int theStart = 0;
int theLength = 0;
theRecognitionResult.TopAlternate.GetTextRangeFromStrokes(theStrokes, ref theStart, ref theLength);
// . . .
이 Visual Basic .NET 예제에서는 RecognitionResult 개체인 theRecognitionResult의 TopAlternate 속성에 대해 ,GetTextRangeFromStrokes 메서드를 호출하고 스트로크 내에서 theStrokes의 인식 결과를 구성하는 Strokes 컬렉션을 전달합니다.
[Visual Basic]
' . . .
Dim theStart As Integer = 0
Dim theLength As Integer = 0
TheRecognitionResult.TopAlternate.GetTextRangeFromStrokes(theStrokes, _
theStart, theLength)
' . . .
플랫폼
Windows Vista
.NET Framework 및 .NET Compact Framework에서 모든 플랫폼의 전체 버전을 지원하지는 않습니다. 지원되는 버전의 목록을 보려면 .NET Framework 시스템 요구 사항을 참조하십시오.
버전 정보
.NET Framework
3.0에서 지원
참고 항목
참조
RecognitionAlternate.GetStrokesFromStrokeRanges