forked from organicmaps/organicmaps
drawing center point coords in the lower right corner.
This commit is contained in:
parent
8e5af97206
commit
7ac446d890
2 changed files with 27 additions and 5 deletions
|
@ -176,8 +176,13 @@ public:
|
|||
#ifdef DRAW_TOUCH_POINTS
|
||||
m_informationDisplay.enableDebugPoints(true);
|
||||
#endif
|
||||
m_informationDisplay.enableCenter(false);
|
||||
|
||||
#ifdef DEBUG
|
||||
m_informationDisplay.enableGlobalRect(!m_isBenchmarking);
|
||||
#endif
|
||||
|
||||
m_informationDisplay.enableCenter(true);
|
||||
|
||||
m_informationDisplay.enableRuler(true);
|
||||
m_informationDisplay.setRulerParams(80, 20);
|
||||
m_navigator.SetMinScreenParams(80, 20);
|
||||
|
|
|
@ -121,13 +121,13 @@ void InformationDisplay::drawHeading(DrawerYG *pDrawer)
|
|||
trueHeadingRad + m_headingOrientation - headingAccuracyRad,
|
||||
trueHeadingRad + m_headingOrientation + headingAccuracyRad,
|
||||
pxConfidenceRadius,
|
||||
yg::Color(255, 0, 0, 64),
|
||||
yg::Color(255, 255, 255, 64),
|
||||
yg::maxDepth);
|
||||
pDrawer->screen()->fillSector(pxPosition,
|
||||
trueHeadingRad + m_headingOrientation - headingAccuracyRad,
|
||||
trueHeadingRad + m_headingOrientation + headingAccuracyRad,
|
||||
pxConfidenceRadius,
|
||||
yg::Color(255, 0, 0, 32),
|
||||
yg::Color(255, 255, 255, 32),
|
||||
yg::maxDepth - 1);
|
||||
/* /// magnetic heading
|
||||
double magneticHeadingRad = m_magneticHeading / 180 * math::pi;
|
||||
|
@ -301,9 +301,26 @@ void InformationDisplay::drawCenter(DrawerYG * drawer)
|
|||
{
|
||||
m_yOffset += 20;
|
||||
ostringstream out;
|
||||
out << "(" << m_centerPt.x << ", " << m_centerPt.y << ") Scale : " << m_currentScale;
|
||||
//out << "(" << m_centerPt.x << ", " << m_centerPt.y << ") Scale : " << m_currentScale;
|
||||
out << "(" << m_centerPt.x << ", " << m_centerPt.y << ")";
|
||||
m2::RectD const & textRect = drawer->screen()->textRect(
|
||||
out.str().c_str(),
|
||||
10,
|
||||
true,
|
||||
false);
|
||||
|
||||
m2::RectD bgRect = m2::Offset(m2::Inflate(textRect, 5.0, 5.0),
|
||||
m_displayRect.maxX() - textRect.SizeX() - 10 * m_visualScale,
|
||||
m_displayRect.maxY() - (m_bottomShift + 10) * m_visualScale - 5);
|
||||
|
||||
drawer->screen()->drawRectangle(
|
||||
bgRect,
|
||||
yg::Color(187, 187, 187, 255),
|
||||
yg::maxDepth - 1);
|
||||
|
||||
drawer->screen()->drawText(
|
||||
m2::PointD(m_displayRect.minX() + 10, m_displayRect.minY() + m_yOffset),
|
||||
m2::PointD(m_displayRect.maxX() - textRect.SizeX() - 10 * m_visualScale,
|
||||
m_displayRect.maxY() - (m_bottomShift + 10) * m_visualScale - 5),
|
||||
0, 10,
|
||||
yg::Color(0, 0, 0, 0),
|
||||
out.str().c_str(),
|
||||
|
|
Loading…
Add table
Reference in a new issue