MCPcopy Create free account
hub / github.com/comaps/comaps / ProcessAreaRules

Method ProcessAreaRules

libs/drape_frontend/apply_feature_functors.cpp:821–841  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

819}
820
821void ApplyAreaFeature::ProcessAreaRules(AreaRuleProto const * areaRule, AreaRuleProto const * hatchingRule)
822{
823 ASSERT(areaRule || hatchingRule, ());
824 ASSERT(HasGeometry(), ());
825
826 double areaDepth = drule::kBaseDepthBgBySize - 1;
827
828 if (hatchingRule)
829 {
830 ASSERT_GREATER_OR_EQUAL(hatchingRule->priority(), drule::kBasePriorityFg, (m_f.DebugString()));
831 ProcessRule(*hatchingRule, areaDepth, true /* isHatching */);
832 }
833
834 if (areaRule)
835 {
836 // Calculate areaDepth for BG-by-size areas only.
837 if (areaRule->priority() < drule::kBasePriorityBgTop)
838 areaDepth = drule::CalcAreaBySizeDepth(m_f);
839 ProcessRule(*areaRule, areaDepth, false /* isHatching */);
840 }
841}
842
843void ApplyAreaFeature::ProcessRule(AreaRuleProto const & areaRule, double areaDepth, bool isHatching)
844{

Callers 1

Calls 4

ASSERTFunction · 0.85
CalcAreaBySizeDepthFunction · 0.85
priorityMethod · 0.60
DebugStringMethod · 0.45

Tested by

no test coverage detected