This fuction is called in iOS/Android native code.
| 5 | { |
| 6 | /// This fuction is called in iOS/Android native code. |
| 7 | inline 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 |
no test coverage detected