compass radius is made no less than 30px.

This commit is contained in:
rachytski 2011-12-09 13:51:44 +04:00 committed by Alex Zolotarev
parent 8c3cf5431e
commit 45553562b2

View file

@ -2,6 +2,7 @@
#include "drawer_yg.hpp"
#include "../platform/location.hpp"
#include "../platform/platform.hpp"
#include "../indexer/mercator.hpp"
@ -56,18 +57,21 @@ namespace location
yg::Color(0, 0, 255, 32),
yg::maxDepth - 3);
// display compass only if position is available
double orientationRadius = max(pxErrorRadius, 30 * GetPlatform().VisualScale());
if (m_flags & State::ECompass)
{
drawer.screen()->drawSector(pxPosition,
m_headingRad - m_headingAccuracyRad,
m_headingRad + m_headingAccuracyRad,
pxErrorRadius,
orientationRadius,
yg::Color(255, 255, 255, 192),
yg::maxDepth);
drawer.screen()->fillSector(pxPosition,
m_headingRad - m_headingAccuracyRad,
m_headingRad + m_headingAccuracyRad,
pxErrorRadius,
orientationRadius,
yg::Color(255, 255, 255, 96),
yg::maxDepth - 1);
}