diff --git a/map/framework.cpp b/map/framework.cpp index d7bad5a07f..ff57c6ec2b 100644 --- a/map/framework.cpp +++ b/map/framework.cpp @@ -2218,16 +2218,24 @@ void Framework::InsertRoute(Route const & route) /// @todo Consider a style parameter for the route color. graphics::Color routeColor; + graphics::Color arrowColor; if (m_currentRouterType == RouterType::Pedestrian) + { routeColor = graphics::Color(5, 105, 175, 255); + arrowColor = graphics::Color(110, 180, 240, 255); + } else + { routeColor = graphics::Color(110, 180, 240, 255); + arrowColor = graphics::Color(40, 70, 160, 255); + } Track::TrackOutline outlines[] { { 10.0f * visScale, routeColor } }; + track.SetArrowColor(arrowColor); track.AddOutline(outlines, ARRAY_SIZE(outlines)); track.AddClosingSymbol(false, "route_to", graphics::EPosCenter, graphics::routingFinishDepth); 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 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 diff --git a/map/route_track.hpp b/map/route_track.hpp index 06698fe005..76a22450f4 100644 --- a/map/route_track.hpp +++ b/map/route_track.hpp @@ -27,6 +27,8 @@ public: void AddClosingSymbol(bool isBeginSymbol, string const & symbolName, graphics::EPosition pos, double depth); + void SetArrowColor(graphics::Color color) { m_arrowColor = color; } + private: void CreateDisplayListSymbols(graphics::Screen * dlScreen, PointContainerT const & pts) const; @@ -48,10 +50,11 @@ private: vector m_beginSymbols; vector m_endSymbols; - routing::turns::TTurnsGeom m_turnsGeom; mutable location::RouteMatchingInfo m_relevantMatchedInfo; mutable graphics::DisplayList * m_closestSegmentDL = nullptr; + + graphics::Color m_arrowColor; }; bool ClipArrowBodyAndGetArrowDirection(vector & ptsTurn, pair & arrowDirection,