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

Function GetScaleAnimation

libs/drape_frontend/screen_animations.cpp:155–166  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

153}
154
155drape_ptr<MapScaleAnimation> GetScaleAnimation(ScreenBase const & startScreen, m2::PointD pxScaleCenter,
156 m2::PointD glbScaleCenter, double factor)
157{
158 ScreenBase endScreen = startScreen;
159 ApplyScale(pxScaleCenter, factor, endScreen);
160
161 auto anim =
162 make_unique_dp<MapScaleAnimation>(startScreen.GetScale(), endScreen.GetScale(), glbScaleCenter, pxScaleCenter);
163 anim->SetMaxDuration(kMaxAnimationTimeSec);
164
165 return anim;
166}
167
168} // namespace df

Callers 1

OnSetScaleMethod · 0.85

Calls 3

ApplyScaleFunction · 0.85
GetScaleMethod · 0.45
SetMaxDurationMethod · 0.45

Tested by

no test coverage detected