summaryrefslogtreecommitdiff
path: root/src/mbgl/style/layers/line_layer_properties.hpp
blob: 07458cd634427d050178b49f90da9c6e98fe8135 (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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
// This file is generated. Edit scripts/generate-style-code.js, then run `make style-code`.

#pragma once

#include <mbgl/style/types.hpp>
#include <mbgl/style/layout_property.hpp>
#include <mbgl/style/paint_property.hpp>

namespace mbgl {
namespace style {

struct LineCap : LayoutProperty<LineCapType> {
    static LineCapType defaultValue() { return LineCapType::Butt; }
};

struct LineJoin : LayoutProperty<LineJoinType> {
    static LineJoinType defaultValue() { return LineJoinType::Miter; }
};

struct LineMiterLimit : LayoutProperty<float> {
    static float defaultValue() { return 2; }
};

struct LineRoundLimit : LayoutProperty<float> {
    static float defaultValue() { return 1; }
};

struct LineOpacity : PaintProperty<float> {
    static float defaultValue() { return 1; }
};

struct LineColor : PaintProperty<Color> {
    static Color defaultValue() { return Color::black(); }
};

struct LineTranslate : PaintProperty<std::array<float, 2>> {
    static std::array<float, 2> defaultValue() { return {{ 0, 0 }}; }
};

struct LineTranslateAnchor : PaintProperty<TranslateAnchorType> {
    static TranslateAnchorType defaultValue() { return TranslateAnchorType::Map; }
};

struct LineWidth : PaintProperty<float> {
    static float defaultValue() { return 1; }
};

struct LineGapWidth : PaintProperty<float> {
    static float defaultValue() { return 0; }
};

struct LineOffset : PaintProperty<float> {
    static float defaultValue() { return 0; }
};

struct LineBlur : PaintProperty<float> {
    static float defaultValue() { return 0; }
};

struct LineDasharray : CrossFadedPaintProperty<std::vector<float>> {
    static std::vector<float> defaultValue() { return {  }; }
};

struct LinePattern : CrossFadedPaintProperty<std::string> {
    static std::string defaultValue() { return ""; }
};

class LineLayoutProperties : public LayoutProperties<
    LineCap,
    LineJoin,
    LineMiterLimit,
    LineRoundLimit
> {};

class LinePaintProperties : public PaintProperties<
    LineOpacity,
    LineColor,
    LineTranslate,
    LineTranslateAnchor,
    LineWidth,
    LineGapWidth,
    LineOffset,
    LineBlur,
    LineDasharray,
    LinePattern
> {};

} // namespace style
} // namespace mbgl