This module provides the handwriting capability.
System capability: SystemCapability.Stylus.Handwrite
Since: 6.0.0(20)
| Name | Description |
|---|---|
| struct HandWrite_HistoricalPoint | Defines the struct of historical touch point information. |
| Name | Description |
|---|---|
| E_NO_ERROR = 0, E_PARAMS = 401, E_INNER_ERROR = 1010400001, E_PERMISSION = 201 } | Defines the handwriting error codes. |
| Name | Function |
|---|---|
int32_t HMS_HandWrite_GetPredictPoint(const HandWrite_HistoricalPoint* event, int32_t size, float *predictPointX, float *predictPointY) | Obtains the prediction point. |
| Name | Function |
|---|---|
| int32_t HMS_HandWrite_SetRefreshDelayOff(const char* xcomponentId, const bool enable) | Reduces the stylus writing latency. |
enum Handwrite_ErrCode
Description
Defines the handwriting error codes.
Since: 6.0.0(20)
| Enumerated Value | Description |
|---|---|
| E_NO_ERROR = 0 | Operation success. |
| E_PARAMS = 401 | Invalid input parameter. |
| E_INNER_ERROR = 1010400001 | Internal system error. Related resources fail to be loaded. |
| E_PERMISSION = 201 | Permission verification failed. Since: 26.0.0 |
int32_t HMS_HandWrite_GetPredictPoint(const HandWrite_HistoricalPoint* event,
int32_t size, float *predictPointX, float *predictPointY) Description
Obtains the prediction point.
Since: 6.0.0(20)
| Name | Description |
|---|---|
| event | Input historical points. |
| size | Number of historical points. |
| predictPointX | Pointer used to store the X coordinate of the prediction point. |
| predictPointY | Pointer used to store the Y coordinate of the prediction point. |
Returns: handwriting error code (HandWrite_ErrCode)
E_NO_ERROR 0: Operation success.
E_PARAMS 401: Invalid input parameter.
E_INNER_ERROR 1010400001: Internal system error. Related resources fail to be loaded.
int32_t HMS_HandWrite_SetRefreshDelayOff(const char* xcomponentId, const bool enable)
Description
Reduces the stylus writing latency for note-taking apps.
Since: 26.0.0
| Name | Description |
|---|---|
| xcomponentId | ID of the custom component. |
| enable | Whether to enable or disable the acceleration function. |
Returns: handwriting error code (HandWrite_ErrCode)
E_NO_ERROR 0: Operation success.
E_PERMISSION 201: Permission verification failed.
E_INNER_ERROR 1010400001: Internal system error. Related resources fail to be loaded.