RecognitionAlternate.GetTextRangeFromStrokes - метод
Обновлен: Ноябрь 2007
Determines the smallest range of recognized text for which the recognizer can return an alternate that contains a known Strokes collection.
Пространство имен: 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
The Strokes collection contained within the alternate.
- selectionStart
Тип: System.Int32%
The start position of the range of recognized text.
- selectionLength
Тип: System.Int32%
The length of the range of recognized text.
Заметки
Use this method to retrieve the text that corresponds to a specified range of Stroke objects. For example, consider a Strokes collection, "how are you", that was drawn using nine strokes (one for each letter and three for each word). If a collection that consists of the sixth and seventh strokes is passed in, corresponding to characters "e" and "y", the text range returned matches the alternate containing "are you" and the selection start and length matches this substring.
Примеры
This C# example calls the GetTextRangeFromStrokes method on the TopAlternate property of a RecognitionResult object, theRecognitionResult, passing in a Strokes collection from within the strokes that make up the recognition result in theStrokes.
[C#]
// . . .
int theStart = 0;
int theLength = 0;
theRecognitionResult.TopAlternate.GetTextRangeFromStrokes(theStrokes, ref theStart, ref theLength);
// . . .
This Visual Basic .NET example calls the GetTextRangeFromStrokes method on the TopAlternate property of a RecognitionResult object, theRecognitionResult, passing in a Strokes collection from within the strokes that make up the recognition result in theStrokes.
[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
См. также
Ссылки
Microsoft.Ink - пространство имен
RecognitionAlternate.GetStrokesFromStrokeRanges