| 505 | } |
| 506 | |
| 507 | void Framework::Touch(int action, Finger const & f1, Finger const & f2, uint8_t maskedPointer) |
| 508 | { |
| 509 | MultiTouchAction eventType = static_cast<MultiTouchAction>(action); |
| 510 | df::TouchEvent event; |
| 511 | |
| 512 | switch (eventType) |
| 513 | { |
| 514 | case MULTITOUCH_DOWN: event.SetTouchType(df::TouchEvent::TOUCH_DOWN); break; |
| 515 | case MULTITOUCH_MOVE: event.SetTouchType(df::TouchEvent::TOUCH_MOVE); break; |
| 516 | case MULTITOUCH_UP: event.SetTouchType(df::TouchEvent::TOUCH_UP); break; |
| 517 | case MULTITOUCH_CANCEL: event.SetTouchType(df::TouchEvent::TOUCH_CANCEL); break; |
| 518 | default: return; |
| 519 | } |
| 520 | |
| 521 | df::Touch touch; |
| 522 | touch.m_location = m2::PointD(f1.m_x, f1.m_y); |
| 523 | touch.m_id = f1.m_id; |
| 524 | event.SetFirstTouch(touch); |
| 525 | |
| 526 | touch.m_location = m2::PointD(f2.m_x, f2.m_y); |
| 527 | touch.m_id = f2.m_id; |
| 528 | event.SetSecondTouch(touch); |
| 529 | |
| 530 | event.SetFirstMaskedPointer(maskedPointer); |
| 531 | m_work.TouchEvent(event); |
| 532 | } |
| 533 | |
| 534 | m2::PointD Framework::GetViewportCenter() const |
| 535 | { |
no test coverage detected