diff options
author | Yury Melnichek <melnichek@gmail.com> | 2012-10-14 17:03:19 +0400 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 01:45:27 +0300 |
commit | d9c867e0c64a86e23b40f33bc839eac33d26b6b9 (patch) | |
tree | beb2b6776d2199b16bfa35795f6b1283177ada07 /map/ruler.cpp | |
parent | 9f8ced184947c5004e0cc7cb811e71b134bf5ca9 (diff) |
Change ruler and coordinates style.
Diffstat (limited to 'map/ruler.cpp')
-rw-r--r-- | map/ruler.cpp | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/map/ruler.cpp b/map/ruler.cpp index 5703d0ec95..b8c80017ed 100644 --- a/map/ruler.cpp +++ b/map/ruler.cpp @@ -256,17 +256,11 @@ void Ruler::update() scalerOrg.y += rulerHeight / 2; m_path.clear(); - m_path.push_back(scalerOrg + m2::PointD(0, rulerHeight)); m_path.push_back(scalerOrg); m_path.push_back(scalerOrg + m2::PointD(scalerWidthInPx, 0)); - m_path.push_back(m_path[2] + m2::PointD(0, rulerHeight)); /// calculating bound rect - - m_boundRect = m2::RectD(m_path[0], m_path[0]); - m_boundRect.Add(m_path[1]); - m_boundRect.Add(m_path[2]); - m_boundRect.Add(m_path[3]); + m_boundRect = m2::RectD(m_path[0], m_path[1]); } else m_hasPendingUpdate = true; @@ -282,19 +276,14 @@ void Ruler::draw(yg::gl::OverlayRenderer * s, math::Matrix<double, 3, 3> const & { if (m_isInitialized) { -// s->drawPath( -// &m_path[0], m_path.size(), 0, -// s->skin()->mapPenInfo(yg::PenInfo(m_fontDesc.m_color, 2 * m_visualScale, 0, 0, 0)), -// depth() - 3); - s->drawPath( &m_path[0], m_path.size(), 0, - s->skin()->mapPenInfo(yg::PenInfo(yg::Color(0, 0, 0, 0x99), 2 * m_visualScale, 0, 0, 0)), + s->skin()->mapPenInfo(yg::PenInfo(yg::Color(0, 0, 0, 0x99), 4 * m_visualScale, 0, 0, 0)), depth()); if (position() & yg::EPosLeft) s->drawText(m_fontDesc, - m_path[2] + m2::PointD(1 * m_visualScale, -1 * m_visualScale), + m_path[1] + m2::PointD(1 * m_visualScale, -2 * m_visualScale), yg::EPosAboveLeft, m_scalerText, depth(), @@ -302,14 +291,15 @@ void Ruler::draw(yg::gl::OverlayRenderer * s, math::Matrix<double, 3, 3> const & else if (position() & yg::EPosRight) s->drawText(m_fontDesc, - m_path[1] + m2::PointD(7 * m_visualScale, -3 * m_visualScale), + m_path[0] + m2::PointD(7 * m_visualScale, -4 * m_visualScale), yg::EPosAboveRight, m_scalerText, depth(), false); else s->drawText(m_fontDesc, - (m_path[1] + m_path[2]) * 0.5 + m2::PointD(0, -3), + (m_path[0] + m_path[1]) * 0.5 + + m2::PointD(7 * m_visualScale, -4 * m_visualScale), yg::EPosAbove, m_scalerText, depth(), |