/
githubmirror
/
omim
Обзор
Документация
Войти
/
githubmirror
/
omim
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
android-943
drape/visual_scale.hpp
17 строк
541 B
Vladimir Byko-Ianko
Increasing visual scale for low dpi.
18 дек 2015, 17:46
18 дек 2015, 17:46
a0e2de0
Код
Авторство
О чём код?
#pragma once namespace dp { inline double VisualScale(double exactDensityDPI) { double constexpr kMdpiDensityDPI = 160.; double const tabletFactor = 1.2; // In case of tablets and iPads increased DPI is used to make visual scale bigger. if (GetPlatform().IsTablet()) exactDensityDPI *= tabletFactor; // For some old devices (for example iPad 2) the density could be less than 160 DPI. // Returns one in that case to keep readable text on the map. return max(1.35, exactDensityDPI / kMdpiDensityDPI); } } // namespace dp