Apply new transit colors.

This commit is contained in:
Daria Volvenkova 2018-06-21 18:28:55 +03:00 committed by Roman Kuznetsov
parent 37d3d2f748
commit e3544b6ebf
5 changed files with 17 additions and 18 deletions

View file

@ -27,9 +27,7 @@ std::string const kRouteArrowsMaskCar = "RouteArrowsMaskCar";
std::string const kRouteMaskBicycle = "RouteMaskBicycle";
std::string const kRouteArrowsMaskBicycle = "RouteArrowsMaskBicycle";
std::string const kRouteMaskPedestrian = "RouteMaskPedestrian";
// TODO(@darina) Use separate colors.
std::string const kTransitOutlineColor = "RouteMarkPrimaryTextOutline";
std::string const kTransitStopInnerMarkerColor = "TransitStopInnerMarker";
namespace
{

View file

@ -22,7 +22,7 @@ extern std::string const kRouteColor;
extern std::string const kRouteOutlineColor;
extern std::string const kRoutePedestrian;
extern std::string const kRouteBicycle;
extern std::string const kTransitOutlineColor;
extern std::string const kTransitStopInnerMarkerColor;
class RouteRenderer final
{

View file

@ -44,11 +44,11 @@ float const kOuterMarkerDepth = kBaseMarkerDepth + 0.5f;
float const kInnerMarkerDepth = kBaseMarkerDepth + 1.0f;
uint32_t const kTransitOverlayIndex = 1000;
// TODO(@darina) Use separate colors.
std::string const kTransitMarkText = "RouteMarkPrimaryText";
std::string const kTransitMarkTextOutline = "RouteMarkPrimaryTextOutline";
std::string const kTransitTransferOuterColor = "RouteMarkPrimaryText";
std::string const kTransitStopInnerColor = "RouteMarkPrimaryTextOutline";
std::string const kTransitMarkText = "TransitMarkPrimaryText";
std::string const kTransitMarkTextOutline = "TransitMarkPrimaryTextOutline";
std::string const kTransitTransferOuterColor = "TransitTransferOuterMarker";
std::string const kTransitTransferInnerColor = "TransitTransferInnerMarker";
std::string const kTransitStopInnerColor = "TransitStopInnerMarker";
float const kTransitMarkTextSize = 12.0f;
@ -622,7 +622,7 @@ void TransitSchemeBuilder::GenerateTransfer(StopNodeParams const & params, m2::P
float const kInnerScale = 1.0f;
float const kOuterScale = 1.5f;
auto const outerColor = GetColorConstant(kTransitTransferOuterColor);
auto const innerColor = GetColorConstant(kTransitStopInnerColor);
auto const innerColor = GetColorConstant(kTransitTransferInnerColor);
float const widthLinesCount = maxLinesCount > 3 ? 1.6f : 1.0f;
float const innerScale = maxLinesCount == 1 ? 1.4f : kInnerScale;

View file

@ -11,9 +11,10 @@ static std::string const kRouteMarkPrimaryTextOutline = "RouteMarkPrimaryTextOut
static std::string const kRouteMarkSecondaryText = "RouteMarkSecondaryText";
static std::string const kRouteMarkSecondaryTextOutline = "RouteMarkSecondaryTextOutline";
// TODO(@darina) Use separate colors.
static std::string const kTransitMarkText = "RouteMarkPrimaryText";
static std::string const kTransitMarkTextOutline = "RouteMarkPrimaryTextOutline";
static std::string const kTransitMarkPrimaryText = "TransitMarkPrimaryText";
static std::string const kTransitMarkPrimaryTextOutline = "TransitMarkPrimaryTextOutline";
static std::string const kTransitMarkSecondaryText = "TransitMarkSecondaryText";
static std::string const kTransitMarkSecondaryTextOutline = "TransitMarkSecondaryTextOutline";
float const kRouteMarkPrimaryTextSize = 11.0f;
float const kRouteMarkSecondaryTextSize = 10.0f;
@ -504,10 +505,10 @@ drape_ptr<df::UserPointMark::SymbolNameZoomInfo> TransitMark::GetSymbolNames() c
void TransitMark::GetDefaultTransitTitle(dp::TitleDecl & titleDecl)
{
titleDecl = dp::TitleDecl();
titleDecl.m_primaryTextFont.m_color = df::GetColorConstant(kTransitMarkText);
titleDecl.m_primaryTextFont.m_outlineColor = df::GetColorConstant(kTransitMarkTextOutline);
titleDecl.m_primaryTextFont.m_color = df::GetColorConstant(kTransitMarkPrimaryText);
titleDecl.m_primaryTextFont.m_outlineColor = df::GetColorConstant(kTransitMarkPrimaryTextOutline);
titleDecl.m_primaryTextFont.m_size = kTransitMarkTextSize;
titleDecl.m_secondaryTextFont.m_color = df::GetColorConstant(kTransitMarkText);
titleDecl.m_secondaryTextFont.m_outlineColor = df::GetColorConstant(kTransitMarkTextOutline);
titleDecl.m_secondaryTextFont.m_color = df::GetColorConstant(kTransitMarkSecondaryText);
titleDecl.m_secondaryTextFont.m_outlineColor = df::GetColorConstant(kTransitMarkSecondaryTextOutline);
titleDecl.m_secondaryTextFont.m_size = kTransitMarkTextSize;
}

View file

@ -318,7 +318,7 @@ void TransitRouteDisplay::ProcessSubroute(vector<RouteSegment> const & segments,
if (marker.m_colors.size() > 1)
{
marker.m_innerColor = df::kTransitOutlineColor;
marker.m_innerColor = df::kTransitStopInnerMarkerColor;
marker.m_up = (currentDir - lastDir).Normalize();
if (m2::CrossProduct(marker.m_up, -lastDir) < 0)
marker.m_up = -marker.m_up;