| 113 | } |
| 114 | |
| 115 | drape_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 | |
| 128 | drape_ptr<MapLinearAnimation> GetSetRectAnimation(ScreenBase const & screen, m2::AnyRectD const & startRect, |
| 129 | m2::AnyRectD const & endRect) |