consistently using arrow as a direction pointer on all platforms.

This commit is contained in:
rachytski 2012-10-23 16:30:03 +03:00 committed by Alex Zolotarev
parent ecd3dcb94b
commit e019afb678
3 changed files with 3 additions and 33 deletions

View file

@ -73,9 +73,6 @@ InformationDisplay::InformationDisplay(Framework * framework)
lsp.m_compassBorderColor = yg::Color(255, 255, 255, 96);
lsp.m_locationAreaColor = yg::Color(11, 97, 210, 48);
lsp.m_framework = framework;
#ifdef OMIM_OS_IPHONE
lsp.m_useDirectionArrow = false;
#endif
m_locationState.reset(new location::State(lsp));

View file

@ -27,7 +27,6 @@
namespace location
{
State::Params::Params()
: m_useDirectionArrow(true)
{}
State::State(Params const & p)
@ -46,7 +45,6 @@ namespace location
m_locationAreaColor = p.m_locationAreaColor;
m_compassAreaColor = p.m_compassAreaColor;
m_compassBorderColor = p.m_compassBorderColor;
m_useDirectionArrow = p.m_useDirectionArrow;
m_framework = p.m_framework;
/// @todo Probably we can make this like static const int.
@ -345,7 +343,7 @@ namespace location
math::Matrix<double, 3, 3> compassDrawM;
/// drawing arrow body first
if (m_hasCompass && m_useDirectionArrow)
if (m_hasCompass)
{
double const headingRad = m_drawHeading;
@ -375,7 +373,7 @@ namespace location
m_framework->GetNavigator().GtoP(Position() + m2::PointD(m_errorRadius, 0.0)));
if (!m_hasCompass || !m_useDirectionArrow)
if (!m_hasCompass)
r->drawSymbol(pxPosition,
"current-position",
yg::EPosCenter,
@ -388,7 +386,7 @@ namespace location
depth() - 3);
/// and then arrow border
if (m_hasCompass && m_useDirectionArrow)
if (m_hasCompass)
{
map<EState, shared_ptr<yg::gl::DisplayList> >::const_iterator it;
it = m_arrowBorderLists.find(state());
@ -398,29 +396,6 @@ namespace location
else
LOG(LWARNING, ("m_arrowBorderLists[state()] is not set!"));
}
/// @todo remove it
if (m_hasCompass && !m_useDirectionArrow)
{
double drawHeadingError = m_compassFilter.GetHeadingHalfErrorRad();
double a = screenAngle + m_drawHeading - math::pi / 2;
double errorRadius = max(pxErrorRadius, 30 * m_controller->GetVisualScale());
r->fillSector(pxPosition,
a - drawHeadingError,
a + drawHeadingError,
errorRadius,
m_compassAreaColor,
depth() - 2);
r->drawSector(pxPosition,
a - drawHeadingError,
a + drawHeadingError,
errorRadius,
m_compassBorderColor,
depth() - 2);
}
}
}
}

View file

@ -101,7 +101,6 @@ namespace location
void purge();
void update();
bool m_useDirectionArrow;
mutable vector<m2::AnyRectD> m_boundRects;
m2::RectD m_boundRect;
@ -124,7 +123,6 @@ namespace location
yg::Color m_locationAreaColor;
yg::Color m_compassAreaColor;
yg::Color m_compassBorderColor;
bool m_useDirectionArrow;
Framework * m_framework;
Params();
};