diff options
Diffstat (limited to 'src/grail-gestures.c')
| -rw-r--r-- | src/grail-gestures.c | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/src/grail-gestures.c b/src/grail-gestures.c index 1e89074..4262af7 100644 --- a/src/grail-gestures.c +++ b/src/grail-gestures.c | |||
| @@ -217,28 +217,3 @@ void gru_end(struct grail *ge, int gid, const struct move_model *m, | |||
| 217 | gin_gid_end(ge, gid, m->fm[FM_X].value, m->fm[FM_Y].value, m->ntouch, | 217 | gin_gid_end(ge, gid, m->fm[FM_X].value, m->fm[FM_Y].value, m->ntouch, |
| 218 | prop, nprop); | 218 | prop, nprop); |
| 219 | } | 219 | } |
| 220 | |||
| 221 | void gru_compute_bbox(struct grail_coord *min, struct grail_coord *max, | ||
| 222 | const struct touch_frame *frame) | ||
| 223 | { | ||
| 224 | float x, y; | ||
| 225 | int i; | ||
| 226 | if (frame->nactive < 1) | ||
| 227 | return; | ||
| 228 | x = frame->active[0]->x; | ||
| 229 | y = frame->active[0]->y; | ||
| 230 | min->x = max->x = x; | ||
| 231 | min->y = max->y = y; | ||
| 232 | for (i = 1; i < frame->nactive; i++) { | ||
| 233 | x = frame->active[i]->x; | ||
| 234 | y = frame->active[i]->y; | ||
| 235 | if (x < min->x) | ||
| 236 | min->x = x; | ||
| 237 | if (y < min->y) | ||
| 238 | min->y = y; | ||
| 239 | if (x > max->x) | ||
| 240 | max->x = x; | ||
| 241 | if (y > max->y) | ||
| 242 | max->y = y; | ||
| 243 | } | ||
| 244 | } | ||
