Lines Matching refs:g
432 lv_indev_gesture_t * g = info; in process_touch_event() local
437 motion_idx = get_motion_idx(touch->id, g); in process_touch_event()
441 if(g->finger_cnt == LV_GESTURE_MAX_POINTS) { in process_touch_event()
447 motion = &g->motions[g->finger_cnt]; in process_touch_event()
455 g->finger_cnt++; in process_touch_event()
460 if(motion_idx == g->finger_cnt - 1) { in process_touch_event()
463 motion = get_motion(touch->id, g); in process_touch_event()
471 len = (g->finger_cnt - 1) - motion_idx; in process_touch_event()
472 lv_memmove(g->motions + motion_idx, in process_touch_event()
473 g->motions + motion_idx + 1, in process_touch_event()
476 g->motions[g->finger_cnt - 1].finger = -1; in process_touch_event()
478 LV_ASSERT(g->motions[motion_idx + 1].finger == -1); in process_touch_event()
481 g->finger_cnt--; in process_touch_event()
486 motion = get_motion(touch->id, g); in process_touch_event()
506 lv_indev_gesture_t * g = gesture; in gesture_update_center_point() local
516 g->p_scale = g->scale; in gesture_update_center_point()
517 g->p_delta_x = g->delta_x; in gesture_update_center_point()
518 g->p_delta_y = g->delta_y; in gesture_update_center_point()
519 g->p_rotation = g->rotation; in gesture_update_center_point()
522 motion = &g->motions[i]; in gesture_update_center_point()
535 g->center.x = x / touch_cnt; in gesture_update_center_point()
536 g->center.y = y / touch_cnt; in gesture_update_center_point()
540 motion = &g->motions[i]; in gesture_update_center_point()
542 delta_x[i] = motion->point.x - g->center.x; in gesture_update_center_point()
543 delta_y[i] = motion->point.y - g->center.y; in gesture_update_center_point()
549 motion = &g->motions[i]; in gesture_update_center_point()
551 g->scale_factors_x[i] = delta_x[i] / scale_factor; in gesture_update_center_point()
552 g->scale_factors_y[i] = delta_y[i] / scale_factor; in gesture_update_center_point()
566 lv_indev_gesture_t * g = gesture; in gesture_calculate_factors() local
577 motion = &g->motions[i]; in gesture_calculate_factors()
594 g->delta_x = g->p_delta_x + (center_x - g->center.x); in gesture_calculate_factors()
595 g->delta_y = g->p_delta_x + (center_y - g->center.y); in gesture_calculate_factors()
599 motion = &g->motions[i]; in gesture_calculate_factors()
604 a += g->scale_factors_x[i] * d_x + g->scale_factors_y[i] * d_y; in gesture_calculate_factors()
605 b += g->scale_factors_x[i] * d_y + g->scale_factors_y[i] * d_x; in gesture_calculate_factors()
609 g->rotation = g->p_rotation + atan2f(b, a); in gesture_calculate_factors()
610 g->scale = g->p_scale * sqrtf((a * a) + (b * b)); in gesture_calculate_factors()
612 g->center.x = (int32_t)center_x; in gesture_calculate_factors()
613 g->center.y = (int32_t)center_y; in gesture_calculate_factors()