From 54cd2ee6020101b6bac9c0b9bf3273ac83f81bbf Mon Sep 17 00:00:00 2001 From: vng Date: Sat, 5 Feb 2011 19:45:17 +0200 Subject: [PATCH] Correct process and call of drawCircle. --- indexer/classificator.cpp | 4 ++-- map/drawer_yg.cpp | 21 ++++++++------------- 2 files changed, 10 insertions(+), 15 deletions(-) diff --git a/indexer/classificator.cpp b/indexer/classificator.cpp index 3db7b266a5..642ddfdc38 100644 --- a/indexer/classificator.cpp +++ b/indexer/classificator.cpp @@ -286,7 +286,7 @@ namespace void add_rule(int ft, iter_t i) { static const int visible[3][drule::count_of_rules] = { - {0, 0, 1, 1, 0, 0, 0}, // fpoint + {0, 0, 1, 1, 1, 0, 0}, // fpoint {1, 0, 0, 0, 0, 1, 0}, // fline {1, 1, 1, 1, 0, 0, 0} // farea }; @@ -406,7 +406,7 @@ bool ClassifObject::IsDrawableLike(feature_t ft) const ASSERT ( ft <= farea, () ); static const int visible[3][drule::count_of_rules] = { - {0, 0, 1, 1, 0, 0, 0}, // fpoint + {0, 0, 1, 1, 1, 0, 0}, // fpoint {1, 0, 0, 0, 0, 1, 0}, // fline {0, 1, 0, 0, 0, 0, 0} // farea (!!! key difference with GetSuitable !!!) }; diff --git a/map/drawer_yg.cpp b/map/drawer_yg.cpp index 74f4e9c69a..6b0854b47b 100644 --- a/map/drawer_yg.cpp +++ b/map/drawer_yg.cpp @@ -330,7 +330,7 @@ void DrawerYG::Draw(di::DrawInfo const * pInfo, rule_ptr_t * rules, int * depthV if (isArea) { bool const isFill = pRule->GetFillColor() != -1; - bool isSym = isSymbol && ((pRule->GetType() & drule::way) != 0); + bool const isSym = isSymbol && ((pRule->GetType() & drule::way) != 0); for (list::const_iterator i = pInfo->m_areas.begin(); i != pInfo->m_areas.end(); ++i) { @@ -338,14 +338,17 @@ void DrawerYG::Draw(di::DrawInfo const * pInfo, rule_ptr_t * rules, int * depthV drawArea(i->m_path, pRule, depth); else if (isSym) drawSymbol(i->GetCenter(), pRule, yg::EPosLeft, depth); - if (isCircle) - drawCircle(i->GetCenter(), pRule, depth); } } // draw point symbol - if (!isPath && !isArea && isSymbol && ((pRule->GetType() & drule::node) != 0)) - drawSymbol(pInfo->m_point, pRule, yg::EPosLeft, depth); + if (!isPath && !isArea && ((pRule->GetType() & drule::node) != 0)) + { + if (isSymbol) + drawSymbol(pInfo->m_point, pRule, yg::EPosLeft, depth); + if (isCircle) + drawCircle(pInfo->m_point, pRule, depth); + } } else { @@ -357,11 +360,7 @@ void DrawerYG::Draw(di::DrawInfo const * pInfo, rule_ptr_t * rules, int * depthV if (isArea && isN) { for (list::const_iterator i = pInfo->m_areas.begin(); i != pInfo->m_areas.end(); ++i) - { drawText(i->GetCenter(), pInfo->m_name, pRule, depth); - if (isCircle) - drawCircle(i->GetCenter(), pRule, depth); - } } // draw way name @@ -394,10 +393,6 @@ void DrawerYG::Draw(di::DrawInfo const * pInfo, rule_ptr_t * rules, int * depthV isN = ((pRule->GetType() & drule::node) != 0); if (!isPath && !isArea && isN) drawText(pInfo->m_point, pInfo->m_name, pRule, depth); - - if (isCircle) - drawCircle(pInfo->m_point, pRule, depth); - } } }