#include <Recognizer.h>
The Recognizer runs background handwriting recognition on ink.
- Since
- 2.1
◆ ~Recognizer()
| virtual myscript::iink::Recognizer::~Recognizer |
( |
| ) |
|
|
virtualdefault |
◆ addListener()
| virtual void myscript::iink::Recognizer::addListener |
( |
std::shared_ptr< IRecognizerListener > |
listener | ) |
|
|
pure virtual |
Adds the specified listener to this recognizer.
- Parameters
-
| listener | the listener to be added. |
◆ removeListener()
| virtual void myscript::iink::Recognizer::removeListener |
( |
std::shared_ptr< IRecognizerListener > |
listener | ) |
|
|
pure virtual |
Removes the specified listener from this recognizer.
- Parameters
-
| listener | the listener to be removed. |
◆ getEngine()
| virtual std::shared_ptr<Engine> myscript::iink::Recognizer::getEngine |
( |
| ) |
|
|
pure virtual |
Returns the Engine to which this recognizer is attached.
- Returns
- the engine.
◆ clear()
| virtual void myscript::iink::Recognizer::clear |
( |
| ) |
|
|
pure virtual |
Removes all content from the recognizer.
- Exceptions
-
◆ getScaleX()
| virtual float myscript::iink::Recognizer::getScaleX |
( |
| ) |
const |
|
pure virtual |
Returns the scale to convert input horizontal coordinates unit into mm, such that (X coordinate unit * scaleX = mm).
- Returns
- the horizontal scale.
◆ getScaleY()
| virtual float myscript::iink::Recognizer::getScaleY |
( |
| ) |
const |
|
pure virtual |
Returns the scale to convert input vertical coordinates unit into mm, such that (Y coordinate unit * scaleY = mm).
- Returns
- the vertical scale.
◆ pointerDown()
| virtual String myscript::iink::Recognizer::pointerDown |
( |
float |
x, |
|
|
float |
y, |
|
|
int64_t |
t, |
|
|
float |
f |
|
) |
| |
|
pure virtual |
Registers a pointer down event.
- Parameters
-
| x | pointer event x coordinate (view coordinates in pixel). |
| y | pointer event y coordinate (view coordinates in pixel). |
| t | pointer event timestamp, in ms since Unix EPOCH. |
| f | normalized pressure. |
- Returns
- the item identifier of the starting stroke if any, otherwise an empty string.
- Exceptions
-
| std::invalid_argument | when x or y is not a number. |
| std::invalid_argument | when t exceeds year 9999. |
| std::invalid_argument | when f is not a number or is negative. |
| pointer_sequence_error | when pointerDown() has already been called. |
◆ pointerMove()
| virtual void myscript::iink::Recognizer::pointerMove |
( |
float |
x, |
|
|
float |
y, |
|
|
int64_t |
t, |
|
|
float |
f |
|
) |
| |
|
pure virtual |
Registers a pointer move event.
- Parameters
-
| x | pointer event x coordinate (view coordinates in pixel). |
| y | pointer event y coordinate (view coordinates in pixel). |
| t | pointer event timestamp, in ms since Unix EPOCH. |
| f | normalized pressure. |
- Exceptions
-
| std::invalid_argument | when x or y is not a number. |
| std::invalid_argument | when f is not a number or is negative. |
| std::invalid_argument | when t exceeds year 9999. |
| std::invalid_argument | when stroke has too many points. |
| pointer_sequence_error | when pointerDown() has not been called before. |
◆ pointerUp()
| virtual void myscript::iink::Recognizer::pointerUp |
( |
float |
x, |
|
|
float |
y, |
|
|
int64_t |
t, |
|
|
float |
f |
|
) |
| |
|
pure virtual |
Registers a pointer up event.
- Parameters
-
| x | pointer event x coordinate (view coordinates in pixel). |
| y | pointer event y coordinate (view coordinates in pixel). |
| t | pointer event timestamp, in ms since Unix EPOCH. |
| f | normalized pressure. |
- Exceptions
-
| std::invalid_argument | when x or y is not a number. |
| std::invalid_argument | when f is not a number or is negative. |
| std::invalid_argument | when t exceeds year 9999. |
| pointer_sequence_error | when pointerDown() has not been called before. |
◆ pointerCancel()
| virtual void myscript::iink::Recognizer::pointerCancel |
( |
| ) |
|
|
pure virtual |
Cancels an ongoing pointer trace.
◆ pointerEvents()
| virtual void myscript::iink::Recognizer::pointerEvents |
( |
const std::vector< PointerEvent > & |
events | ) |
|
|
pure virtual |
Sends a series of pointer events.
- Parameters
-
| events | the list of events (view coordinates in pixel). |
- Exceptions
-
| std::invalid_argument | when a pointer event contains incorrect data. |
| std::invalid_argument | when stroke has too many points. |
| pointer_sequence_error | when event sequence is not allowed. |
◆ isIdle()
| virtual bool myscript::iink::Recognizer::isIdle |
( |
| ) |
|
|
pure virtual |
Checks whether ongoing operations are over.
- Returns
true if no operation is ongoing, otherwise false.
◆ waitForIdle()
| virtual void myscript::iink::Recognizer::waitForIdle |
( |
| ) |
|
|
pure virtual |
Waits until ongoing operations are over.
◆ getConfiguration()
| virtual std::shared_ptr<Configuration> myscript::iink::Recognizer::getConfiguration |
( |
| ) |
|
|
pure virtual |
Returns the configuration associated with this recognizer.
- Returns
- the recognizer configuration.
◆ getSupportedResultMimeTypes()
| virtual std::vector<MimeType> myscript::iink::Recognizer::getSupportedResultMimeTypes |
( |
| ) |
|
|
pure virtual |
Returns the supported result formats.
- Returns
- an array of the supported mime types.
◆ getResult()
| virtual String myscript::iink::Recognizer::getResult |
( |
MimeType |
mimeType | ) |
|
|
pure virtual |
Returns the result of the recognition since the last call to clear().
- Parameters
-
| mimeType | the mime type that specifies the output format. |
- Returns
- the result as a string.
- Exceptions
-
| std::invalid_argument | when the specified mime type is not supported. |
The documentation for this class was generated from the following file: