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

feature_processor.hpp « render - github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: fca491913d7d244d71c578f3e0f1e15b478f2d43 (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
48
49
50
51
52
53
#pragma once

#include "events.hpp"

#include "indexer/drawing_rule_def.hpp"
#include "indexer/feature.hpp"
#include "indexer/data_header.hpp"
#include "indexer/feature_data.hpp"

#include "geometry/rect2d.hpp"

#include "graphics/glyph_cache.hpp"

class ScreenBase;

class redraw_operation_cancelled {};

namespace fwork
{
#ifndef USE_DRAPE
  class FeatureProcessor
  {
    m2::RectD m_rect;

    set<string> m_coasts;

    ScreenBase const & m_convertor;

    shared_ptr<PaintEvent> m_paintEvent;

    int m_zoom;
    bool m_hasNonCoast;
    bool m_hasAnyFeature;

    graphics::GlyphCache * m_glyphCache;

    inline Drawer * GetDrawer() const { return m_paintEvent->drawer(); }

    void PreProcessKeys(vector<drule::Key> & keys) const;

  public:

    FeatureProcessor(m2::RectD const & r,
                     ScreenBase const & convertor,
                     shared_ptr<PaintEvent> const & paintEvent,
                     int scaleLevel);

    bool operator() (FeatureType const & f);

    bool IsEmptyDrawing() const;
  };
#endif //USE_DRAPE
}