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
|
#ifndef LLMR_STYLE_STYLE
#define LLMR_STYLE_STYLE
#include <array>
#include <map>
#include "../util/pbf.hpp"
namespace llmr {
typedef std::array<float, 4> Color;
enum Winding {
EvenOdd = 1,
NonZero = 2
};
// enum LineCap {
// Round = 1
// };
// enum LineJoin {
// Butt = 1,
// Bevel = 2
// };
struct StrokeProperties {
Color line_color = {{ 0, 0, 0, 1 }};
float line_width = 1;
};
struct FillProperties {
Winding winding = NonZero;
bool antialiasing = true;
Color fill_color = {{ 0, 0, 0, 1 }};
Color stroke_color = {{ 0, 0, 0, 1 }};
float stroke_width = 1;
};
class Style {
public:
Style();
void reset();
void load(pbf data);
public:
std::map<std::string, FillProperties> computedFills;
std::map<std::string, StrokeProperties> computedStrokes;
};
}
#endif
|