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

Function GetSetRectAnimation

libs/drape_frontend/screen_animations.cpp:128–142  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

126}
127
128drape_ptr<MapLinearAnimation> GetSetRectAnimation(ScreenBase const & screen, m2::AnyRectD const & startRect,
129 m2::AnyRectD const & endRect)
130{
131 auto anim = make_unique_dp<MapLinearAnimation>();
132
133 double const startScale = CalculateScale(screen.PixelRect(), startRect.GetLocalRect());
134 double const endScale = CalculateScale(screen.PixelRect(), endRect.GetLocalRect());
135
136 anim->SetRotate(startRect.Angle().val(), endRect.Angle().val());
137 anim->SetMove(startRect.GlobalCenter(), endRect.GlobalCenter(), screen);
138 anim->SetScale(startScale, endScale);
139 anim->SetMaxScaleDuration(kMaxAnimationTimeSec);
140
141 return anim;
142}
143
144drape_ptr<MapFollowAnimation> GetFollowAnimation(ScreenBase const & startScreen, m2::PointD const & userPos,
145 double targetScale, double targetAngle, m2::PointD const & endPixelPos,

Callers

nothing calls this directly

Calls 7

CalculateScaleFunction · 0.85
SetRotateMethod · 0.80
AngleMethod · 0.80
SetMoveMethod · 0.80
GlobalCenterMethod · 0.80
SetMaxScaleDurationMethod · 0.80
SetScaleMethod · 0.45

Tested by

no test coverage detected