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

Method GetScaleRange

libs/indexer/data_header.cpp:72–92  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

70}
71
72std::pair<int, int> DataHeader::GetScaleRange() const
73{
74 using namespace scales;
75
76 int const low = 0;
77 int const high = GetUpperScale();
78 int const worldH = GetUpperWorldScale();
79 MapType const type = GetType();
80
81 switch (type)
82 {
83 case MapType::World: return {low, worldH};
84 case MapType::WorldCoasts: return {low, high};
85 default:
86 ASSERT_EQUAL(type, MapType::Country, ());
87 return {worldH + 1, high};
88
89 // Uncomment this to test countries drawing in all scales.
90 // return {1, high};
91 }
92}
93
94void DataHeader::Save(FileWriter & w) const
95{

Callers 2

SetContextMethod · 0.45
CreateInfoMethod · 0.45

Calls 3

GetUpperScaleFunction · 0.85
GetUpperWorldScaleFunction · 0.85
GetTypeFunction · 0.50

Tested by

no test coverage detected