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

Method GetCurrentScreen

libs/drape_frontend/animation/animation.cpp:26–49  ·  view source on GitHub ↗

static

Source from the content-addressed store, hash-verified

24
25// static
26void Animation::GetCurrentScreen(TPropertyCache const & properties, ScreenBase const & screen,
27 ScreenBase & currentScreen)
28{
29 currentScreen = screen;
30
31 if (!properties.empty())
32 {
33 double scale = currentScreen.GetScale();
34 double angle = currentScreen.GetAngle();
35 m2::PointD pos = currentScreen.GlobalRect().GlobalZero();
36
37 PropertyValue value;
38 if (GetCachedProperty(properties, Object::MapPlane, ObjectProperty::Scale, value))
39 scale = value.m_valueD;
40
41 if (GetCachedProperty(properties, Object::MapPlane, ObjectProperty::Angle, value))
42 angle = value.m_valueD;
43
44 if (GetCachedProperty(properties, Object::MapPlane, ObjectProperty::Position, value))
45 pos = value.m_valuePointD;
46
47 currentScreen.SetFromParams(pos, angle, scale);
48 }
49}
50
51bool Animation::HasSameObjects(Animation const & animation) const
52{

Callers 11

AcceptMessageMethod · 0.80
InvalidateRectMethod · 0.80
GetVisiblePOIMethod · 0.80
PullToBoundAreaMethod · 0.80
PrepareBucketMethod · 0.80
RefreshBgColorMethod · 0.80
OnTapMethod · 0.80
OnTwoFingersTapMethod · 0.80
OnNewVisibleViewportMethod · 0.80

Calls 5

GlobalZeroMethod · 0.80
SetFromParamsMethod · 0.80
emptyMethod · 0.45
GetScaleMethod · 0.45
GetAngleMethod · 0.45

Tested by

no test coverage detected