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

Function GetRectAnimation

libs/drape_frontend/screen_animations.cpp:115–126  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

113}
114
115drape_ptr<MapLinearAnimation> GetRectAnimation(ScreenBase const & startScreen, ScreenBase const & endScreen)
116{
117 auto anim = make_unique_dp<MapLinearAnimation>();
118
119 anim->SetRotate(startScreen.GetAngle(), endScreen.GetAngle());
120 anim->SetMove(startScreen.GetOrg(), endScreen.GetOrg(), startScreen.PixelRectIn3d(),
121 (startScreen.GetScale() + endScreen.GetScale()) / 2.0);
122 anim->SetScale(startScreen.GetScale(), endScreen.GetScale());
123 anim->SetMaxScaleDuration(kMaxAnimationTimeSec);
124
125 return anim;
126}
127
128drape_ptr<MapLinearAnimation> GetSetRectAnimation(ScreenBase const & screen, m2::AnyRectD const & startRect,
129 m2::AnyRectD const & endRect)

Callers 1

SetScreenMethod · 0.85

Calls 6

SetRotateMethod · 0.80
SetMoveMethod · 0.80
SetMaxScaleDurationMethod · 0.80
GetAngleMethod · 0.45
GetScaleMethod · 0.45
SetScaleMethod · 0.45

Tested by

no test coverage detected