![]() |
MyScript Interactive Ink SDK
4.0.0
|
#include <PointerEvent.h>
Public Member Functions | |
| PointerEvent ()=default | |
| PointerEvent & | down (float x, float y) |
| PointerEvent & | move (float x, float y) |
| PointerEvent & | up (float x, float y) |
| PointerEvent & | timestamp (int64_t t) |
| PointerEvent & | force (float f) |
| PointerEvent & | tiltAngle (float tilt) |
| PointerEvent & | orientationAngle (float orientation) |
| PointerEvent & | type (PointerType pointerType) |
| PointerEvent & | id (int pointerId) |
| bool | hasTiltAndOrientation () const |
Public Attributes | |
| PointerEventType | eventType = PointerEventType::CANCEL |
| float | x = 0.f |
| float | y = 0.f |
| int64_t | t = -1 |
| float | f = 1.f |
| float | tilt = -1.f |
| float | orientation = -10.f |
| PointerType | pointerType = PointerType::PEN |
| int | pointerId = -1 |
Represents a pointer event.
|
default |
|
inline |
Update this event to a "down" event.
| x | the x coordinate location. |
| y | the y coordinate location. |
|
inline |
Update this event to a "move" event.
| x | the x coordinate location. |
| y | the y coordinate location. |
|
inline |
Update this event to a "up" event.
| x | the x coordinate location. |
| y | the y coordinate location. |
|
inline |
Update the event timestamp.
| t | the timestamp value. |
|
inline |
Update the event pressure.
| f | the pressure value. |
|
inline |
Update the event tilt angle.
| tilt | the tilt value. |
|
inline |
Update the event orientation angle.
| orientation | the orientation value. |
|
inline |
Update the event pointer type.
| pointerType | the pointer type. |
|
inline |
Update the event pointer id.
| pointerId | the pointer id value. |
| bool myscript::iink::PointerEvent::hasTiltAndOrientation | ( | ) | const |
Check whether the event has tilt and orientation information.
true if the event has tilt and orientation info, otherwise false.| PointerEventType myscript::iink::PointerEvent::eventType = PointerEventType::CANCEL |
The event type.
| float myscript::iink::PointerEvent::x = 0.f |
The event x coordinate.
| float myscript::iink::PointerEvent::y = 0.f |
The event y coordinate.
| int64_t myscript::iink::PointerEvent::t = -1 |
The event timestamp in ms since Unix EPOCH, or -1.
| float myscript::iink::PointerEvent::f = 1.f |
The event normalized pressure, in [0,1].
| float myscript::iink::PointerEvent::tilt = -1.f |
The event tilt in radians. 0 is perpendicular, Pi/2 if flat on screen.
| float myscript::iink::PointerEvent::orientation = -10.f |
The event orientation in radians. 0 is pointing up, -Pi/2 is left, Pi/2 is right, +/-Pi is down.
| PointerType myscript::iink::PointerEvent::pointerType = PointerType::PEN |
The type of input pointer.
| int myscript::iink::PointerEvent::pointerId = -1 |
The id of the pointer.