background image
C H A P T E R 1 0
Recognition: Advanced Topics
Using Advanced Topics in Recognition
GetKeyView().viewInkWordScript := func(strokeBundle) begin
// convert the stroke bundle into an ink word
local inkPoly := CompressStrokes(strokeBundle);
local inkWord :=;
local textSlot := "\uF701";
local stylesSlot := [1, inkWord];
local root := GetRoot();
// create a rich string with the ink word in it
local appendString := MakeRichString(textSlot,
// append the rich string to myRichString
if root.myRichString then
root.myRichString := root.myRichString && appendString;
root.myRichString := appendString;
// return nil so default handling still happens
This implementation converts the stroke bundle into an ink word, creates a rich
string that includes the ink word, and appends that rich string to a rich string that is
stored in the root (
). The method then returns
, which allows
the built-in handling of the stroke bundle to occur.
© 2007-2024, o7 studio » при воспроизведении материала сайта ссылка обязательна