Welcome to mirror list, hosted at ThFree Co, Russian Federation.

image_view.hpp « gui - github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 936d1093d9dc5ddc04efea379a8a55ed99ca3d36 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#pragma once

#include "element.hpp"

#include "../graphics/image.hpp"
#include "../graphics/display_list.hpp"

#include "../std/scoped_ptr.hpp"

namespace graphics
{
  class OverlayRenderer;
}

namespace gui
{
  class ImageView : public Element
  {
  private:

    mutable vector<m2::AnyRectD> m_boundRects;

    graphics::Image::Info m_image;
    m2::RectU m_margin;
    scoped_ptr<graphics::DisplayList> m_displayList;

  public:

    void cache();
    void purge();

    typedef Element base_t;

    struct Params : public base_t::Params
    {
      graphics::Image::Info m_image;
      Params();
    };

    ImageView(Params const & p);

    vector<m2::AnyRectD> const & boundRects() const;

    void draw(graphics::OverlayRenderer * r, math::Matrix<double, 3, 3> const & m) const;
    void setImage(graphics::Image::Info const & info);
  };
}