MCPcopy Create free account
hub / github.com/TDesktop-x64/tdesktop / ComputeLocation

Function ComputeLocation

Telegram/SourceFiles/data/data_location.cpp:69–84  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

67}
68
69GeoPointLocation ComputeLocation(const LocationPoint &point) {
70 const auto scale = 1 + (cScale() * style::DevicePixelRatio()) / 200;
71 const auto zoom = 13 + (scale - 1);
72 const auto w = st::locationSize.width() / scale;
73 const auto h = st::locationSize.height() / scale;
74
75 auto result = GeoPointLocation();
76 result.lat = point.lat();
77 result.lon = point.lon();
78 result.access = point.accessHash();
79 result.width = w;
80 result.height = h;
81 result.zoom = zoom;
82 result.scale = scale;
83 return result;
84}
85
86} // namespace Data

Callers 2

locationMethod · 0.85
makeMapBlockMethod · 0.85

Calls 7

cScaleFunction · 0.85
latMethod · 0.80
lonMethod · 0.80
GeoPointLocationClass · 0.70
widthMethod · 0.45
heightMethod · 0.45
accessHashMethod · 0.45

Tested by

no test coverage detected