57 static void update_multistroke(
multistroke_t* ms,
int group) {
59 ms->
uid = strokes[group].
uid;
80 calculate_transform(ms);
130 dx[i] = strokes[i].
x - ms->
cx;
131 dy[i] = strokes[i].
y - ms->
cy;
137 ms->
sx[i] = dx[i] / a;
138 ms->
sy[i] = dy[i] / a;
158 ms->
dx = ms->
dx0 + (cx - ms->
cx);
159 ms->
dy = ms->
dy0 + (cy - ms->
cy);
166 float dx = strokes[i].
x - cx;
167 float dy = strokes[i].
y - cy;
168 a += ms->
sx[i] * dx + ms->
sy[i] * dy;
169 b += ms->
sx[i] * dy - ms->
sy[i] * dx;
void recognize_multistroke(const touch_event_t *event)
Recognize multistroke gesture. This gesture allows the number of fingers to change.
void init_multistroke()
Initialize multistroke data structures.
multistroke_t multistroke_d[MAX_TOUCHES]
const multistroke_t * get_multistroke()
Access array of multistroke_t of size MAX_TOUCHES.
state
This represents the state of individual gesture recognizers.
@ RECOGNIZER_STATE_IN_PROGRESS
@ RECOGNIZER_STATE_COMPLETED
const stroke_t * get_stroke()
Access array of stroke_t of size MAX_TOUCHES.
Data structure for stroke gesture data.
char strokes[MAX_TOUCHES]
Data structure for stroke gesture data.
To use the gesture library, users create touch events and fill in the appropriate fields.