MCPcopy Create free account
hub / github.com/comaps/comaps / BeginScale

Method BeginScale

libs/drape_frontend/user_event_stream.cpp:1063–1085  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1061}
1062
1063void UserEventStream::BeginScale(Touch const & t1, Touch const & t2)
1064{
1065 TEST_CALL(BEGIN_SCALE);
1066
1067 if (m_state == STATE_SCALE)
1068 {
1069 Scale(t1, t2);
1070 return;
1071 }
1072
1073 ASSERT(m_state == STATE_EMPTY || m_state == STATE_TAP_TWO_FINGERS, ());
1074 m_state = STATE_SCALE;
1075 m2::PointD touch1(t1.m_location);
1076 m2::PointD touch2(t2.m_location);
1077
1078 if (m_listener)
1079 {
1080 m_listener->OnScaleStarted();
1081 m_listener->CorrectScalePoint(touch1, touch2);
1082 }
1083
1084 m_navigator.StartScale(touch1, touch2);
1085}
1086
1087void UserEventStream::Scale(Touch const & t1, Touch const & t2)
1088{

Callers

nothing calls this directly

Calls 5

ScaleFunction · 0.85
ASSERTFunction · 0.85
StartScaleMethod · 0.80
OnScaleStartedMethod · 0.45
CorrectScalePointMethod · 0.45

Tested by

no test coverage detected