diff options
Diffstat (limited to 'map/ruler.hpp')
-rw-r--r-- | map/ruler.hpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/map/ruler.hpp b/map/ruler.hpp index c04da25ced..0d5aaf905a 100644 --- a/map/ruler.hpp +++ b/map/ruler.hpp @@ -31,7 +31,7 @@ private: yg::FontDesc m_fontDesc; ScreenBase m_screen; - float m_unitsDiff; //< current diff in units between two endpoints of the ruler. + float m_metresDiff; //< current diff in units between two endpoints of the ruler. string m_scalerText; vector<m2::PointD> m_path; @@ -43,6 +43,18 @@ private: mutable vector<m2::AnyRectD> m_boundRects; + typedef double (*ConversionFn)(double); + vector<pair<string, double> > * m_units; + ConversionFn m_conversionFn; + + vector<pair<string, double> > m_yards; + vector<pair<string, double> > m_feets; + vector<pair<string, double> > m_metres; + + void initYards(); + void initMetres(); + void initFeets(); + public: void update(); //< update internal params after some other params changed. |