summaryrefslogtreecommitdiff
path: root/src/mbgl/style/layers/raster_layer.cpp
blob: fb7f08fbe91fd189ea60cc18530507b408004cfb (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
90
91
92
93
94
95
96
97
98
// This file is generated. Edit scripts/generate-style-code.js, then run `make style-code`.

#include <mbgl/style/layers/raster_layer.hpp>
#include <mbgl/style/layers/raster_layer_impl.hpp>

namespace mbgl {
namespace style {

RasterLayer::RasterLayer(const std::string& layerID)
    : Layer(Type::Raster, std::make_unique<Impl>())
    , impl(static_cast<Impl*>(baseImpl.get())) {
    impl->id = layerID;
}

RasterLayer::RasterLayer(const Impl& other)
    : Layer(Type::Raster, std::make_unique<Impl>(other))
    , impl(static_cast<Impl*>(baseImpl.get())) {
}

RasterLayer::~RasterLayer() = default;

std::unique_ptr<Layer> RasterLayer::Impl::clone() const {
    return std::make_unique<RasterLayer>(*this);
}

// Source

void RasterLayer::setSource(const std::string& sourceID) {
    impl->source = sourceID;
}

const std::string& RasterLayer::getSourceID() const {
    return impl->source;
}

// Layout properties


// Paint properties

PropertyValue<float> RasterLayer::getRasterOpacity() const {
    return impl->paint.rasterOpacity.get();
}

void RasterLayer::setRasterOpacity(PropertyValue<float> value) {
    impl->paint.rasterOpacity.set(value);
}

PropertyValue<float> RasterLayer::getRasterHueRotate() const {
    return impl->paint.rasterHueRotate.get();
}

void RasterLayer::setRasterHueRotate(PropertyValue<float> value) {
    impl->paint.rasterHueRotate.set(value);
}

PropertyValue<float> RasterLayer::getRasterBrightnessMin() const {
    return impl->paint.rasterBrightnessMin.get();
}

void RasterLayer::setRasterBrightnessMin(PropertyValue<float> value) {
    impl->paint.rasterBrightnessMin.set(value);
}

PropertyValue<float> RasterLayer::getRasterBrightnessMax() const {
    return impl->paint.rasterBrightnessMax.get();
}

void RasterLayer::setRasterBrightnessMax(PropertyValue<float> value) {
    impl->paint.rasterBrightnessMax.set(value);
}

PropertyValue<float> RasterLayer::getRasterSaturation() const {
    return impl->paint.rasterSaturation.get();
}

void RasterLayer::setRasterSaturation(PropertyValue<float> value) {
    impl->paint.rasterSaturation.set(value);
}

PropertyValue<float> RasterLayer::getRasterContrast() const {
    return impl->paint.rasterContrast.get();
}

void RasterLayer::setRasterContrast(PropertyValue<float> value) {
    impl->paint.rasterContrast.set(value);
}

PropertyValue<float> RasterLayer::getRasterFadeDuration() const {
    return impl->paint.rasterFadeDuration.get();
}

void RasterLayer::setRasterFadeDuration(PropertyValue<float> value) {
    impl->paint.rasterFadeDuration.set(value);
}

} // namespace style
} // namespace mbgl