summaryrefslogtreecommitdiff
path: root/src/mbgl/style/layers/line_layer_properties.hpp
blob: c715171c8826c7b3f3d901000b9db9fdb14e1c56 (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
// This file is generated. Edit scripts/generate-style-code.js, then run `make style-code`.

#pragma once

#include <mbgl/style/layout_property.hpp>
#include <mbgl/style/paint_property.hpp>
#include <mbgl/util/rapidjson.hpp>

namespace mbgl {
namespace style {

class CascadeParameters;
class CalculationParameters;

class LineLayoutProperties {
public:
    void parse(const JSValue&);
    void recalculate(const CalculationParameters&);

    LayoutProperty<LineCapType> lineCap { LineCapType::Butt };
    LayoutProperty<LineJoinType> lineJoin { LineJoinType::Miter };
    LayoutProperty<float> lineMiterLimit { 2 };
    LayoutProperty<float> lineRoundLimit { 1 };
};

class LinePaintProperties {
public:
    void parse(const JSValue&);
    void cascade(const CascadeParameters&);
    bool recalculate(const CalculationParameters&);

    PaintProperty<float> lineOpacity { 1 };
    PaintProperty<Color> lineColor { { 0, 0, 0, 1 } };
    PaintProperty<std::array<float, 2>> lineTranslate { {{ 0, 0 }} };
    PaintProperty<TranslateAnchorType> lineTranslateAnchor { TranslateAnchorType::Map };
    PaintProperty<float> lineWidth { 1 };
    PaintProperty<float> lineGapWidth { 0 };
    PaintProperty<float> lineOffset { 0 };
    PaintProperty<float> lineBlur { 0 };
    PaintProperty<std::vector<float>, CrossFadedPropertyEvaluator> lineDasharray { {  } };
    PaintProperty<std::string, CrossFadedPropertyEvaluator> linePattern { "" };
};

} // namespace style
} // namespace mbgl