blob: 4af2842783b1b9ce2ac03c59d4557c9868c3d17f (
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
54
|
#pragma once
#include "drape_frontend/map_shape.hpp"
#include "drape_frontend/tile_key.hpp"
#include "drape/pointers.hpp"
#include "geometry/rect2d.hpp"
#include "geometry/screenbase.hpp"
#include "std/array.hpp"
#include "std/function.hpp"
#include "std/set.hpp"
#include "std/string.hpp"
class FeatureType;
namespace df
{
class EngineContext;
class Stylist;
class RuleDrawer
{
public:
using TDrawerCallback = function<void (FeatureType const &, Stylist &)>;
using TCheckCancelledCallback = function<bool ()>;
using TIsCountryLoadedByNameFn = function<bool (string const &)>;
RuleDrawer(TDrawerCallback const & drawerFn, TCheckCancelledCallback const & checkCancelled,
TIsCountryLoadedByNameFn const & isLoadedFn, ref_ptr<EngineContext> context, bool is3dBuildings);
~RuleDrawer();
void operator() (FeatureType const & f);
private:
bool CheckCancelled();
TDrawerCallback m_callback;
TCheckCancelledCallback m_checkCancelled;
TIsCountryLoadedByNameFn m_isLoadedFn;
ref_ptr<EngineContext> m_context;
m2::RectD m_globalRect;
double m_currentScaleGtoP;
bool const m_is3dBuidings;
array<TMapShapes, df::MapShapeTypeCount> m_mapShapes;
bool m_wasCancelled;
};
} // namespace dfo
|