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

Function VisualScale

libs/drape/visual_scale.hpp:7–16  ·  view source on GitHub ↗

This fuction is called in iOS/Android native code.

Source from the content-addressed store, hash-verified

5{
6/// This fuction is called in iOS/Android native code.
7inline double VisualScale(double exactDensityDPI)
8{
9 // In case of tablets and iPads increased DPI is used to make visual scale bigger.
10 if (GetPlatform().IsTablet())
11 exactDensityDPI *= 1.2;
12
13 // For some old devices (for example iPad 2) the density could be less than 160 DPI (mdpi).
14 // Returns one in that case to keep readable text on the map.
15 return std::max(1.35, exactDensityDPI / 160.0);
16}
17} // namespace dp

Callers 2

CreateDrapeEngineMethod · 0.85
UpdateDpiMethod · 0.85

Calls 1

IsTabletMethod · 0.80

Tested by

no test coverage detected