diff options
author | vng <viktor.govako@gmail.com> | 2014-09-06 20:07:12 +0400 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 02:26:11 +0300 |
commit | 7a54c6e0801cfab379816ac93b474cb68e10beb0 (patch) | |
tree | f96ed040f8eac68f0cb962ee705558fe097c0ebb /map/compass_arrow.hpp | |
parent | 696fde40b3f9d5f5e393f76cfb57680de7a3a829 (diff) |
Minor refactoring of OverlayElement and it’s inheritors: do not store rough rect and vector of any rects by default.
Diffstat (limited to 'map/compass_arrow.hpp')
-rw-r--r-- | map/compass_arrow.hpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/map/compass_arrow.hpp b/map/compass_arrow.hpp index 0b4823cd07..ab0ad1912b 100644 --- a/map/compass_arrow.hpp +++ b/map/compass_arrow.hpp @@ -23,9 +23,9 @@ class Framework; /// and rotates screen back to straight orientation when beeing pressed class CompassArrow : public gui::Element { -private: - typedef gui::Element base_t; + typedef gui::Element BaseT; + mutable m2::PointI m_pixelSize; double m_angle; unique_ptr<graphics::DisplayList> m_dl; @@ -37,16 +37,13 @@ private: float GetCurrentAlfa() const; void CreateAnim(double startAlfa, double endAlfa, double timeInterval, double timeOffset, bool isVisibleAtEnd); - mutable vector<m2::AnyRectD> m_boundRects; - Framework * m_framework; graphics::Resource const * GetCompassResource() const; bool isBaseVisible() const; public: - - struct Params : public base_t::Params + struct Params : public BaseT::Params { Framework * m_framework; Params(); @@ -58,11 +55,12 @@ public: void AnimateHide(); void SetAngle(double angle); - m2::PointD GetPixelSize() const; + m2::PointI GetPixelSize() const; /// @name Override from graphics::Overlayelement and gui::Element. //@{ - vector<m2::AnyRectD> const & boundRects() const; + virtual void GetMiniBoundRects(RectsT & rects) const; + void draw(graphics::OverlayRenderer * r, math::Matrix<double, 3, 3> const & m) const; bool isVisible() const; bool roughHitTest(m2::PointD const & pt) const; |