diff --git a/generator/osm2type.cpp b/generator/osm2type.cpp index 4598ba160f..0e4dac26dc 100644 --- a/generator/osm2type.cpp +++ b/generator/osm2type.cpp @@ -129,11 +129,6 @@ namespace ftype { m_count = 0; } - ~do_find_name() - { - if (m_tunnel && m_params.layer < 0) - m_params.layer = feature::LAYER_TRANSPARENT_TUNNEL; - } bool GetLangByKey(string const & k, string & lang) { diff --git a/indexer/feature_data.hpp b/indexer/feature_data.hpp index 27351961ae..07128e59e1 100644 --- a/indexer/feature_data.hpp +++ b/indexer/feature_data.hpp @@ -45,7 +45,7 @@ namespace feature LAYER_LOW = -11, LAYER_EMPTY = 0, - LAYER_TRANSPARENT_TUNNEL = 11, // draw transparent road (tunnels) + LAYER_TRANSPARENT_TUNNEL = 11, LAYER_HIGH = 12 }; diff --git a/map/drawer.cpp b/map/drawer.cpp index 0c597a651c..aace9aeb3a 100644 --- a/map/drawer.cpp +++ b/map/drawer.cpp @@ -186,9 +186,6 @@ void Drawer::drawPath(di::PathInfo const & path, di::DrawRule const * rules, siz infos[i] = &penInfos[i]; - if (rules[i].m_transparent) - penInfos[i].m_color.a = 100; - resIDs[i] = m_pScreen->invalidHandle(); } @@ -203,7 +200,7 @@ void Drawer::drawPath(di::PathInfo const & path, di::DrawRule const * rules, siz buffer_vector rects; for (unsigned i = 0; i < count; ++i) rects.push_back(infos[i]->resourceSize()); - LOG(LERROR, ("couldn't successfully pack a sequence of path styles as a whole :" , rects)); + LOG(LERROR, ("couldn't successfully pack a sequence of path styles as a whole:" , rects)); return; } @@ -356,26 +353,27 @@ void Drawer::Draw(di::FeatureInfo const & fi) { drule::BaseRule const * pRule = rules[i].m_rule; - bool const hasSymbol = pRule->GetSymbol() != 0; + bool const isSymbol = pRule->GetSymbol() != 0; bool const isCaption = pRule->GetCaption(0) != 0; + bool const isCircle = pRule->GetCircle() != 0; - if (pSymbolRule == NULL && pRule->GetSymbol() != 0) + if (pSymbolRule == NULL && isSymbol) { pSymbolRule = pRule; symbolDepth = rules[i].m_depth; } - if (pCircleRule == NULL && pRule->GetCircle() != 0) + if (pCircleRule == NULL && isCircle) { pCircleRule = pRule; circleDepth = rules[i].m_depth; } - if (!isCaption && isPath && !hasSymbol && (pRule->GetLine() != 0)) + if (!isCaption && isPath && !isSymbol && (pRule->GetLine() != 0)) pathRules.push_back(rules[i]); } - isCircleAndSymbol = pSymbolRule != NULL && pCircleRule != NULL; + isCircleAndSymbol = (pSymbolRule != NULL) && (pCircleRule != NULL); if (!pathRules.empty()) { @@ -402,19 +400,19 @@ void Drawer::Draw(di::FeatureInfo const & fi) for (list::const_iterator i = fi.m_areas.begin(); i != fi.m_areas.end(); ++i) { if (isFill) - drawArea(*i, di::DrawRule(pRule, depth, false)); - else if (isCircleAndSymbol) + drawArea(*i, di::DrawRule(pRule, depth)); + else if (isCircleAndSymbol && isCircle) { drawCircledSymbol(i->GetCenter(), graphics::EPosCenter, - di::DrawRule(pSymbolRule, symbolDepth, false), - di::DrawRule(pCircleRule, circleDepth, false), + di::DrawRule(pSymbolRule, symbolDepth), + di::DrawRule(pCircleRule, circleDepth), id); } else if (isSymbol) - drawSymbol(i->GetCenter(), graphics::EPosCenter, di::DrawRule(pRule, depth, false), id); + drawSymbol(i->GetCenter(), graphics::EPosCenter, di::DrawRule(pRule, depth), id); else if (isCircle) - drawCircle(i->GetCenter(), graphics::EPosCenter, di::DrawRule(pRule, depth, false), id); + drawCircle(i->GetCenter(), graphics::EPosCenter, di::DrawRule(pRule, depth), id); } } @@ -425,14 +423,14 @@ void Drawer::Draw(di::FeatureInfo const & fi) { drawCircledSymbol(fi.m_point, graphics::EPosCenter, - di::DrawRule(pSymbolRule, symbolDepth, false), - di::DrawRule(pCircleRule, circleDepth, false), + di::DrawRule(pSymbolRule, symbolDepth), + di::DrawRule(pCircleRule, circleDepth), id); } else if (isSymbol) - drawSymbol(fi.m_point, graphics::EPosCenter, di::DrawRule(pRule, depth, false), id); + drawSymbol(fi.m_point, graphics::EPosCenter, di::DrawRule(pRule, depth), id); else if (isCircle) - drawCircle(fi.m_point, graphics::EPosCenter, di::DrawRule(pRule, depth, false), id); + drawCircle(fi.m_point, graphics::EPosCenter, di::DrawRule(pRule, depth), id); } } else @@ -461,20 +459,20 @@ void Drawer::Draw(di::FeatureInfo const & fi) if (isArea/* && isN*/) { for (list::const_iterator i = fi.m_areas.begin(); i != fi.m_areas.end(); ++i) - drawText(i->GetCenter(), textPosition, fi.m_styler, di::DrawRule(pRule, depth, false), id); + drawText(i->GetCenter(), textPosition, fi.m_styler, di::DrawRule(pRule, depth), id); } // draw way name if (isPath && !isArea && isN && !fi.m_styler.FilterTextSize(pRule)) { for (list::const_iterator i = fi.m_pathes.begin(); i != fi.m_pathes.end(); ++i) - drawPathText(*i, fi.m_styler, di::DrawRule(pRule, depth, false)); + drawPathText(*i, fi.m_styler, di::DrawRule(pRule, depth)); } // draw point text isN = ((pRule->GetType() & drule::node) != 0); if (!isPath && !isArea && isN) - drawText(fi.m_point, textPosition, fi.m_styler, di::DrawRule(pRule, depth, false), id); + drawText(fi.m_point, textPosition, fi.m_styler, di::DrawRule(pRule, depth), id); } } } diff --git a/map/feature_styler.cpp b/map/feature_styler.cpp index 950a99262c..ea2f305c0c 100644 --- a/map/feature_styler.cpp +++ b/map/feature_styler.cpp @@ -32,12 +32,12 @@ namespace di { uint32_t DrawRule::GetID(size_t threadSlot) const { - return (m_transparent ? m_rule->GetID2(threadSlot) : m_rule->GetID(threadSlot)); + return m_rule->GetID(threadSlot); } void DrawRule::SetID(size_t threadSlot, uint32_t id) const { - m_transparent ? m_rule->SetID2(threadSlot, id) : m_rule->SetID(threadSlot, id); + m_rule->SetID(threadSlot, id); } FeatureStyler::FeatureStyler(FeatureType const & f, @@ -115,7 +115,6 @@ namespace di drule::MakeUnique(keys); int layer = f.GetLayer(); - bool isTransparent = false; if (layer == feature::LAYER_TRANSPARENT_TUNNEL) layer = 0; @@ -167,7 +166,7 @@ namespace di if (!m_hasLineStyles && (keys[i].m_type == drule::line)) m_hasLineStyles = true; - m_rules[i] = di::DrawRule(drule::rules().Find(keys[i]), depth, isTransparent); + m_rules[i] = di::DrawRule(drule::rules().Find(keys[i]), depth); if (m_rules[i].m_rule->GetCaption(1) != 0) hasSecondaryText = true; diff --git a/map/feature_styler.hpp b/map/feature_styler.hpp index 2a544d2023..0f2d34af46 100644 --- a/map/feature_styler.hpp +++ b/map/feature_styler.hpp @@ -21,15 +21,12 @@ namespace di { drule::BaseRule const * m_rule; double m_depth; - bool m_transparent; DrawRule() : m_rule(0) {} DrawRule(drule::BaseRule const * p, - double d, - bool tr) + double d) : m_rule(p), - m_depth(d), - m_transparent(tr) + m_depth(d) {} uint32_t GetID(size_t threadSlot) const;