Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorConstantin Shalnev <c.shalnev@corp.mail.ru>2015-07-21 18:21:06 +0300
committerAlex Zolotarev <alex@maps.me>2015-09-23 02:57:04 +0300
commite0a3b78025c98ce56b64bcbc5bf0d46311af529a (patch)
tree8519b300efcd04e139d73bf51557d0e845149e67 /map/route_track.cpp
parent0dc3e2ab69b78eeba5a40f6109daa2b9b170a290 (diff)
Set arrow color in framework class instead of hardcode
Diffstat (limited to 'map/route_track.cpp')
-rw-r--r--map/route_track.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/map/route_track.cpp b/map/route_track.cpp
index c62632c45d..b34f670ac8 100644
--- a/map/route_track.cpp
+++ b/map/route_track.cpp
@@ -184,7 +184,6 @@ void RouteTrack::CreateDisplayListArrows(graphics::Screen * dlScreen, MatrixT co
double const arrowWidth = 10. * visualScale;
double const arrowLength = 19. * visualScale;
double const arrowBodyWidth = 8. * visualScale;
- graphics::Color const arrowColor(graphics::Color(40, 70, 160, 255));
double const arrowDepth = graphics::arrowDepth;
pair<m2::PointD, m2::PointD> arrowDirection;
@@ -210,12 +209,12 @@ void RouteTrack::CreateDisplayListArrows(graphics::Screen * dlScreen, MatrixT co
if (!ptsNextTurn.empty())
drawArrowHead = !MergeArrows(ptsTurn, ptsNextTurn, beforeTurn + afterTurn, arrowLength);
- graphics::Pen::Info const outlineInfo(arrowColor, arrowBodyWidth);
+ graphics::Pen::Info const outlineInfo(m_arrowColor, arrowBodyWidth);
uint32_t const outlineId = dlScreen->mapInfo(outlineInfo);
dlScreen->drawPath(&ptsTurn[0], ptsTurn.size(), 0, outlineId, arrowDepth);
if (drawArrowHead)
- DrawArrowTriangle(dlScreen, arrowDirection, arrowWidth, arrowLength, arrowColor, arrowDepth);
+ DrawArrowTriangle(dlScreen, arrowDirection, arrowWidth, arrowLength, m_arrowColor, arrowDepth);
ptsNextTurn = ptsTurn;
}
}
@@ -346,6 +345,8 @@ void RouteTrack::Swap(RouteTrack & rhs)
rhs.m_relevantMatchedInfo.Reset();
m_relevantMatchedInfo.Reset();
+
+ swap(m_arrowColor, rhs.m_arrowColor);
}
void RouteTrack::CleanUp() const