diff options
author | r.kuznetsov <r.kuznetsov@corp.mail.ru> | 2016-09-01 18:13:15 +0300 |
---|---|---|
committer | r.kuznetsov <r.kuznetsov@corp.mail.ru> | 2016-09-02 16:40:15 +0300 |
commit | feda627f30fd97b62f904c43ca3c8f3f1e608ca0 (patch) | |
tree | 8dcc86ab477a17a74dd4014158c3d3dc8429c489 /drape_frontend/rule_drawer.cpp | |
parent | 4737649abe7a822453999dafa3563a5423833b84 (diff) |
Added tile-based model-view
Diffstat (limited to 'drape_frontend/rule_drawer.cpp')
-rw-r--r-- | drape_frontend/rule_drawer.cpp | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/drape_frontend/rule_drawer.cpp b/drape_frontend/rule_drawer.cpp index 2a7a3a8102..e65a9eeabc 100644 --- a/drape_frontend/rule_drawer.cpp +++ b/drape_frontend/rule_drawer.cpp @@ -162,8 +162,8 @@ void RuleDrawer::operator()(FeatureType const & f) // highway-path-bridge and building (sic!) at the same time (pedestrian crossing). is3dBuilding = (ftypes::IsBuildingChecker::Instance()(f) || ftypes::IsBuildingPartChecker::Instance()(f)) && - !ftypes::IsBridgeChecker::Instance()(f) && - !ftypes::IsTunnelChecker::Instance()(f); + !ftypes::IsBridgeChecker::Instance()(f) && + !ftypes::IsTunnelChecker::Instance()(f); } m2::PointD featureCenter; @@ -220,8 +220,9 @@ void RuleDrawer::operator()(FeatureType const & f) if (applyPointStyle || is3dBuilding) minVisibleScale = feature::GetMinDrawableScale(f); - ApplyAreaFeature apply(insertShape, f.GetID(), m_globalRect, areaMinHeight, areaHeight, - minVisibleScale, f.GetRank(), s.GetCaptionDescription()); + ApplyAreaFeature apply(m_globalRect.Center(), insertShape, f.GetID(), m_globalRect, + areaMinHeight, areaHeight, minVisibleScale, f.GetRank(), + s.GetCaptionDescription()); f.ForEachTriangle(apply, zoomLevel); apply.SetHotelData(ExtractHotelData(f)); if (applyPointStyle) @@ -235,8 +236,9 @@ void RuleDrawer::operator()(FeatureType const & f) } else if (s.LineStyleExists()) { - ApplyLineFeature apply(insertShape, f.GetID(), m_globalRect, minVisibleScale, f.GetRank(), - s.GetCaptionDescription(), m_currentScaleGtoP, + ApplyLineFeature apply(m_globalRect.Center(), m_currentScaleGtoP, + insertShape, f.GetID(), m_globalRect, minVisibleScale, + f.GetRank(), s.GetCaptionDescription(), zoomLevel >= kLineSimplifyLevelStart && zoomLevel <= kLineSimplifyLevelEnd, f.GetPointsCount()); f.ForEachPoint(apply, zoomLevel); @@ -253,7 +255,7 @@ void RuleDrawer::operator()(FeatureType const & f) ASSERT(s.PointStyleExists(), ()); minVisibleScale = feature::GetMinDrawableScale(f); - ApplyPointFeature apply(insertShape, f.GetID(), minVisibleScale, f.GetRank(), + ApplyPointFeature apply(m_globalRect.Center(), insertShape, f.GetID(), minVisibleScale, f.GetRank(), s.GetCaptionDescription(), 0.0f /* posZ */); apply.SetHotelData(ExtractHotelData(f)); f.ForEachPoint([&apply](m2::PointD const & pt) { apply(pt, false /* hasArea */); }, zoomLevel); @@ -277,6 +279,7 @@ void RuleDrawer::operator()(FeatureType const & f) m2::SharedSpline spline(path); df::LineViewParams p; + p.m_tileCenter = m_globalRect.Center(); p.m_baseGtoPScale = 1.0; p.m_cap = dp::ButtCap; p.m_color = dp::Color::Red(); @@ -287,6 +290,7 @@ void RuleDrawer::operator()(FeatureType const & f) insertShape(make_unique_dp<LineShape>(spline, p)); df::TextViewParams tp; + tp.m_tileCenter = m_globalRect.Center(); tp.m_anchor = dp::Center; tp.m_depth = 20000; tp.m_primaryText = strings::to_string(key.m_x) + " " + |