summaryrefslogtreecommitdiff
path: root/include/mbgl/style/layers
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2016-04-26 16:39:56 -0700
committerJohn Firebaugh <john.firebaugh@gmail.com>2016-06-02 14:51:39 -0700
commitc902f9098b331302aaa1baac77d1575db624a132 (patch)
tree211901cd04454aedbac40c469198438e46d7038c /include/mbgl/style/layers
parent18149cbcc27a926f280b08d8d0e09104b2147688 (diff)
downloadqtlocation-mapboxgl-c902f9098b331302aaa1baac77d1575db624a132.tar.gz
[core] Rationalize naming for style-related code
Diffstat (limited to 'include/mbgl/style/layers')
-rw-r--r--include/mbgl/style/layers/background_layer.hpp45
-rw-r--r--include/mbgl/style/layers/circle_layer.hpp63
-rw-r--r--include/mbgl/style/layers/custom_layer.hpp71
-rw-r--r--include/mbgl/style/layers/fill_layer.hpp66
-rw-r--r--include/mbgl/style/layers/line_layer.hpp91
-rw-r--r--include/mbgl/style/layers/raster_layer.hpp62
-rw-r--r--include/mbgl/style/layers/symbol_layer.hpp184
7 files changed, 582 insertions, 0 deletions
diff --git a/include/mbgl/style/layers/background_layer.hpp b/include/mbgl/style/layers/background_layer.hpp
new file mode 100644
index 0000000000..2eb84ee499
--- /dev/null
+++ b/include/mbgl/style/layers/background_layer.hpp
@@ -0,0 +1,45 @@
+// This file is generated. Do not edit.
+
+#pragma once
+
+#include <mbgl/style/layer.hpp>
+#include <mbgl/style/filter.hpp>
+#include <mbgl/style/property_value.hpp>
+
+#include <mbgl/util/color.hpp>
+
+namespace mbgl {
+namespace style {
+
+class BackgroundLayer : public Layer {
+public:
+ BackgroundLayer(const std::string& layerID);
+ ~BackgroundLayer() final;
+
+ // Paint properties
+
+ PropertyValue<Color> getBackgroundColor() const;
+ void setBackgroundColor(PropertyValue<Color>);
+
+ PropertyValue<std::string> getBackgroundPattern() const;
+ void setBackgroundPattern(PropertyValue<std::string>);
+
+ PropertyValue<float> getBackgroundOpacity() const;
+ void setBackgroundOpacity(PropertyValue<float>);
+
+ // Private implementation
+
+ class Impl;
+ Impl* const impl;
+
+ BackgroundLayer(const Impl&);
+ BackgroundLayer(const BackgroundLayer&) = delete;
+};
+
+template <>
+inline bool Layer::is<BackgroundLayer>() const {
+ return type == Type::Background;
+}
+
+} // namespace style
+} // namespace mbgl
diff --git a/include/mbgl/style/layers/circle_layer.hpp b/include/mbgl/style/layers/circle_layer.hpp
new file mode 100644
index 0000000000..10d281b6ac
--- /dev/null
+++ b/include/mbgl/style/layers/circle_layer.hpp
@@ -0,0 +1,63 @@
+// This file is generated. Do not edit.
+
+#pragma once
+
+#include <mbgl/style/layer.hpp>
+#include <mbgl/style/filter.hpp>
+#include <mbgl/style/property_value.hpp>
+
+#include <mbgl/util/color.hpp>
+
+namespace mbgl {
+namespace style {
+
+class CircleLayer : public Layer {
+public:
+ CircleLayer(const std::string& layerID);
+ ~CircleLayer() final;
+
+ // Source
+
+ void setSource(const std::string& sourceID, const std::string& sourceLayer);
+ const std::string& getSourceID() const;
+ const std::string& getSourceLayer() const;
+
+ void setFilter(const Filter&);
+ const Filter& getFilter() const;
+
+ // Paint properties
+
+ PropertyValue<float> getCircleRadius() const;
+ void setCircleRadius(PropertyValue<float>);
+
+ PropertyValue<Color> getCircleColor() const;
+ void setCircleColor(PropertyValue<Color>);
+
+ PropertyValue<float> getCircleBlur() const;
+ void setCircleBlur(PropertyValue<float>);
+
+ PropertyValue<float> getCircleOpacity() const;
+ void setCircleOpacity(PropertyValue<float>);
+
+ PropertyValue<std::array<float, 2>> getCircleTranslate() const;
+ void setCircleTranslate(PropertyValue<std::array<float, 2>>);
+
+ PropertyValue<TranslateAnchorType> getCircleTranslateAnchor() const;
+ void setCircleTranslateAnchor(PropertyValue<TranslateAnchorType>);
+
+ // Private implementation
+
+ class Impl;
+ Impl* const impl;
+
+ CircleLayer(const Impl&);
+ CircleLayer(const CircleLayer&) = delete;
+};
+
+template <>
+inline bool Layer::is<CircleLayer>() const {
+ return type == Type::Circle;
+}
+
+} // namespace style
+} // namespace mbgl
diff --git a/include/mbgl/style/layers/custom_layer.hpp b/include/mbgl/style/layers/custom_layer.hpp
new file mode 100644
index 0000000000..d3867e2c4f
--- /dev/null
+++ b/include/mbgl/style/layers/custom_layer.hpp
@@ -0,0 +1,71 @@
+#pragma once
+
+#include <mbgl/style/layer.hpp>
+
+namespace mbgl {
+namespace style {
+
+/**
+ * Initialize any GL state needed by the custom layer. This method is called once, from the
+ * rendering thread, at a point when the GL context is active but before rendering for the
+ * first time.
+ *
+ * Resources that are acquired in this method must be released in the UninitializeFunction.
+ */
+using CustomLayerInitializeFunction = void (*)(void* context);
+
+/**
+ * Parameters that define the current camera position for a CustomLayerRenderFunction.
+ */
+struct CustomLayerRenderParameters {
+ double width;
+ double height;
+ double latitude;
+ double longitude;
+ double zoom;
+ double bearing;
+ double pitch;
+ double altitude;
+};
+
+/**
+ * Render the layer. This method is called once per frame. The implementation should not make
+ * any assumptions about the GL state (other than that the correct context is active). It may
+ * make changes to the state, and is not required to reset values such as the depth mask, stencil
+ * mask, and corresponding test flags to their original values.
+ */
+using CustomLayerRenderFunction = void (*)(void* context, const CustomLayerRenderParameters&);
+
+/**
+ * Destroy any GL state needed by the custom layer, and deallocate context, if necessary. This
+ * method is called once, from the rendering thread, at a point when the GL context is active.
+ *
+ * Note that it may be called even when the InitializeFunction has not been called.
+ */
+using CustomLayerDeinitializeFunction = void (*)(void* context);
+
+class CustomLayer : public Layer {
+public:
+ CustomLayer(const std::string& id,
+ CustomLayerInitializeFunction,
+ CustomLayerRenderFunction,
+ CustomLayerDeinitializeFunction,
+ void* context);
+ ~CustomLayer() final;
+
+ // Private implementation
+
+ class Impl;
+ Impl* impl;
+
+ CustomLayer(const Impl&);
+ CustomLayer(const CustomLayer&) = delete;
+};
+
+template <>
+inline bool Layer::is<CustomLayer>() const {
+ return type == Type::Custom;
+}
+
+} // namespace style
+} // namespace mbgl
diff --git a/include/mbgl/style/layers/fill_layer.hpp b/include/mbgl/style/layers/fill_layer.hpp
new file mode 100644
index 0000000000..a14bf4a390
--- /dev/null
+++ b/include/mbgl/style/layers/fill_layer.hpp
@@ -0,0 +1,66 @@
+// This file is generated. Do not edit.
+
+#pragma once
+
+#include <mbgl/style/layer.hpp>
+#include <mbgl/style/filter.hpp>
+#include <mbgl/style/property_value.hpp>
+
+#include <mbgl/util/color.hpp>
+
+namespace mbgl {
+namespace style {
+
+class FillLayer : public Layer {
+public:
+ FillLayer(const std::string& layerID);
+ ~FillLayer() final;
+
+ // Source
+
+ void setSource(const std::string& sourceID, const std::string& sourceLayer);
+ const std::string& getSourceID() const;
+ const std::string& getSourceLayer() const;
+
+ void setFilter(const Filter&);
+ const Filter& getFilter() const;
+
+ // Paint properties
+
+ PropertyValue<bool> getFillAntialias() const;
+ void setFillAntialias(PropertyValue<bool>);
+
+ PropertyValue<float> getFillOpacity() const;
+ void setFillOpacity(PropertyValue<float>);
+
+ PropertyValue<Color> getFillColor() const;
+ void setFillColor(PropertyValue<Color>);
+
+ PropertyValue<Color> getFillOutlineColor() const;
+ void setFillOutlineColor(PropertyValue<Color>);
+
+ PropertyValue<std::array<float, 2>> getFillTranslate() const;
+ void setFillTranslate(PropertyValue<std::array<float, 2>>);
+
+ PropertyValue<TranslateAnchorType> getFillTranslateAnchor() const;
+ void setFillTranslateAnchor(PropertyValue<TranslateAnchorType>);
+
+ PropertyValue<std::string> getFillPattern() const;
+ void setFillPattern(PropertyValue<std::string>);
+
+ // Private implementation
+
+ class Impl;
+ Impl* const impl;
+
+ FillLayer(const Impl&);
+ FillLayer(const FillLayer&) = delete;
+};
+
+template <>
+inline bool Layer::is<FillLayer>() const {
+ return type == Type::Fill;
+}
+
+} // namespace style
+} // namespace mbgl
diff --git a/include/mbgl/style/layers/line_layer.hpp b/include/mbgl/style/layers/line_layer.hpp
new file mode 100644
index 0000000000..fb9e37811a
--- /dev/null
+++ b/include/mbgl/style/layers/line_layer.hpp
@@ -0,0 +1,91 @@
+// This file is generated. Do not edit.
+
+#pragma once
+
+#include <mbgl/style/layer.hpp>
+#include <mbgl/style/filter.hpp>
+#include <mbgl/style/property_value.hpp>
+
+#include <mbgl/util/color.hpp>
+
+#include <vector>
+
+namespace mbgl {
+namespace style {
+
+class LineLayer : public Layer {
+public:
+ LineLayer(const std::string& layerID);
+ ~LineLayer() final;
+
+ // Source
+
+ void setSource(const std::string& sourceID, const std::string& sourceLayer);
+ const std::string& getSourceID() const;
+ const std::string& getSourceLayer() const;
+
+ void setFilter(const Filter&);
+ const Filter& getFilter() const;
+
+ // Layout properties
+
+ PropertyValue<LineCapType> getLineCap() const;
+ void setLineCap(PropertyValue<LineCapType>);
+
+ PropertyValue<LineJoinType> getLineJoin() const;
+ void setLineJoin(PropertyValue<LineJoinType>);
+
+ PropertyValue<float> getLineMiterLimit() const;
+ void setLineMiterLimit(PropertyValue<float>);
+
+ PropertyValue<float> getLineRoundLimit() const;
+ void setLineRoundLimit(PropertyValue<float>);
+
+ // Paint properties
+
+ PropertyValue<float> getLineOpacity() const;
+ void setLineOpacity(PropertyValue<float>);
+
+ PropertyValue<Color> getLineColor() const;
+ void setLineColor(PropertyValue<Color>);
+
+ PropertyValue<std::array<float, 2>> getLineTranslate() const;
+ void setLineTranslate(PropertyValue<std::array<float, 2>>);
+
+ PropertyValue<TranslateAnchorType> getLineTranslateAnchor() const;
+ void setLineTranslateAnchor(PropertyValue<TranslateAnchorType>);
+
+ PropertyValue<float> getLineWidth() const;
+ void setLineWidth(PropertyValue<float>);
+
+ PropertyValue<float> getLineGapWidth() const;
+ void setLineGapWidth(PropertyValue<float>);
+
+ PropertyValue<float> getLineOffset() const;
+ void setLineOffset(PropertyValue<float>);
+
+ PropertyValue<float> getLineBlur() const;
+ void setLineBlur(PropertyValue<float>);
+
+ PropertyValue<std::vector<float>> getLineDasharray() const;
+ void setLineDasharray(PropertyValue<std::vector<float>>);
+
+ PropertyValue<std::string> getLinePattern() const;
+ void setLinePattern(PropertyValue<std::string>);
+
+ // Private implementation
+
+ class Impl;
+ Impl* const impl;
+
+ LineLayer(const Impl&);
+ LineLayer(const LineLayer&) = delete;
+};
+
+template <>
+inline bool Layer::is<LineLayer>() const {
+ return type == Type::Line;
+}
+
+} // namespace style
+} // namespace mbgl
diff --git a/include/mbgl/style/layers/raster_layer.hpp b/include/mbgl/style/layers/raster_layer.hpp
new file mode 100644
index 0000000000..6d0c7dd91c
--- /dev/null
+++ b/include/mbgl/style/layers/raster_layer.hpp
@@ -0,0 +1,62 @@
+// This file is generated. Do not edit.
+
+#pragma once
+
+#include <mbgl/style/layer.hpp>
+#include <mbgl/style/filter.hpp>
+#include <mbgl/style/property_value.hpp>
+
+#include <mbgl/util/color.hpp>
+
+namespace mbgl {
+namespace style {
+
+class RasterLayer : public Layer {
+public:
+ RasterLayer(const std::string& layerID);
+ ~RasterLayer() final;
+
+ // Source
+
+ void setSource(const std::string& sourceID);
+ const std::string& getSourceID() const;
+
+ // Paint properties
+
+ PropertyValue<float> getRasterOpacity() const;
+ void setRasterOpacity(PropertyValue<float>);
+
+ PropertyValue<float> getRasterHueRotate() const;
+ void setRasterHueRotate(PropertyValue<float>);
+
+ PropertyValue<float> getRasterBrightnessMin() const;
+ void setRasterBrightnessMin(PropertyValue<float>);
+
+ PropertyValue<float> getRasterBrightnessMax() const;
+ void setRasterBrightnessMax(PropertyValue<float>);
+
+ PropertyValue<float> getRasterSaturation() const;
+ void setRasterSaturation(PropertyValue<float>);
+
+ PropertyValue<float> getRasterContrast() const;
+ void setRasterContrast(PropertyValue<float>);
+
+ PropertyValue<float> getRasterFadeDuration() const;
+ void setRasterFadeDuration(PropertyValue<float>);
+
+ // Private implementation
+
+ class Impl;
+ Impl* const impl;
+
+ RasterLayer(const Impl&);
+ RasterLayer(const RasterLayer&) = delete;
+};
+
+template <>
+inline bool Layer::is<RasterLayer>() const {
+ return type == Type::Raster;
+}
+
+} // namespace style
+} // namespace mbgl
diff --git a/include/mbgl/style/layers/symbol_layer.hpp b/include/mbgl/style/layers/symbol_layer.hpp
new file mode 100644
index 0000000000..3806310c95
--- /dev/null
+++ b/include/mbgl/style/layers/symbol_layer.hpp
@@ -0,0 +1,184 @@
+// This file is generated. Do not edit.
+
+#pragma once
+
+#include <mbgl/style/layer.hpp>
+#include <mbgl/style/filter.hpp>
+#include <mbgl/style/property_value.hpp>
+
+#include <mbgl/util/color.hpp>
+
+#include <vector>
+
+namespace mbgl {
+namespace style {
+
+class SymbolLayer : public Layer {
+public:
+ SymbolLayer(const std::string& layerID);
+ ~SymbolLayer() final;
+
+ // Source
+
+ void setSource(const std::string& sourceID, const std::string& sourceLayer);
+ const std::string& getSourceID() const;
+ const std::string& getSourceLayer() const;
+
+ void setFilter(const Filter&);
+ const Filter& getFilter() const;
+
+ // Layout properties
+
+ PropertyValue<SymbolPlacementType> getSymbolPlacement() const;
+ void setSymbolPlacement(PropertyValue<SymbolPlacementType>);
+
+ PropertyValue<float> getSymbolSpacing() const;
+ void setSymbolSpacing(PropertyValue<float>);
+
+ PropertyValue<bool> getSymbolAvoidEdges() const;
+ void setSymbolAvoidEdges(PropertyValue<bool>);
+
+ PropertyValue<bool> getIconAllowOverlap() const;
+ void setIconAllowOverlap(PropertyValue<bool>);
+
+ PropertyValue<bool> getIconIgnorePlacement() const;
+ void setIconIgnorePlacement(PropertyValue<bool>);
+
+ PropertyValue<bool> getIconOptional() const;
+ void setIconOptional(PropertyValue<bool>);
+
+ PropertyValue<RotationAlignmentType> getIconRotationAlignment() const;
+ void setIconRotationAlignment(PropertyValue<RotationAlignmentType>);
+
+ PropertyValue<float> getIconSize() const;
+ void setIconSize(PropertyValue<float>);
+
+ PropertyValue<std::string> getIconImage() const;
+ void setIconImage(PropertyValue<std::string>);
+
+ PropertyValue<float> getIconRotate() const;
+ void setIconRotate(PropertyValue<float>);
+
+ PropertyValue<float> getIconPadding() const;
+ void setIconPadding(PropertyValue<float>);
+
+ PropertyValue<bool> getIconKeepUpright() const;
+ void setIconKeepUpright(PropertyValue<bool>);
+
+ PropertyValue<std::array<float, 2>> getIconOffset() const;
+ void setIconOffset(PropertyValue<std::array<float, 2>>);
+
+ PropertyValue<RotationAlignmentType> getTextRotationAlignment() const;
+ void setTextRotationAlignment(PropertyValue<RotationAlignmentType>);
+
+ PropertyValue<std::string> getTextField() const;
+ void setTextField(PropertyValue<std::string>);
+
+ PropertyValue<std::vector<std::string>> getTextFont() const;
+ void setTextFont(PropertyValue<std::vector<std::string>>);
+
+ PropertyValue<float> getTextSize() const;
+ void setTextSize(PropertyValue<float>);
+
+ PropertyValue<float> getTextMaxWidth() const;
+ void setTextMaxWidth(PropertyValue<float>);
+
+ PropertyValue<float> getTextLineHeight() const;
+ void setTextLineHeight(PropertyValue<float>);
+
+ PropertyValue<float> getTextLetterSpacing() const;
+ void setTextLetterSpacing(PropertyValue<float>);
+
+ PropertyValue<TextJustifyType> getTextJustify() const;
+ void setTextJustify(PropertyValue<TextJustifyType>);
+
+ PropertyValue<TextAnchorType> getTextAnchor() const;
+ void setTextAnchor(PropertyValue<TextAnchorType>);
+
+ PropertyValue<float> getTextMaxAngle() const;
+ void setTextMaxAngle(PropertyValue<float>);
+
+ PropertyValue<float> getTextRotate() const;
+ void setTextRotate(PropertyValue<float>);
+
+ PropertyValue<float> getTextPadding() const;
+ void setTextPadding(PropertyValue<float>);
+
+ PropertyValue<bool> getTextKeepUpright() const;
+ void setTextKeepUpright(PropertyValue<bool>);
+
+ PropertyValue<TextTransformType> getTextTransform() const;
+ void setTextTransform(PropertyValue<TextTransformType>);
+
+ PropertyValue<std::array<float, 2>> getTextOffset() const;
+ void setTextOffset(PropertyValue<std::array<float, 2>>);
+
+ PropertyValue<bool> getTextAllowOverlap() const;
+ void setTextAllowOverlap(PropertyValue<bool>);
+
+ PropertyValue<bool> getTextIgnorePlacement() const;
+ void setTextIgnorePlacement(PropertyValue<bool>);
+
+ PropertyValue<bool> getTextOptional() const;
+ void setTextOptional(PropertyValue<bool>);
+
+ // Paint properties
+
+ PropertyValue<float> getIconOpacity() const;
+ void setIconOpacity(PropertyValue<float>);
+
+ PropertyValue<Color> getIconColor() const;
+ void setIconColor(PropertyValue<Color>);
+
+ PropertyValue<Color> getIconHaloColor() const;
+ void setIconHaloColor(PropertyValue<Color>);
+
+ PropertyValue<float> getIconHaloWidth() const;
+ void setIconHaloWidth(PropertyValue<float>);
+
+ PropertyValue<float> getIconHaloBlur() const;
+ void setIconHaloBlur(PropertyValue<float>);
+
+ PropertyValue<std::array<float, 2>> getIconTranslate() const;
+ void setIconTranslate(PropertyValue<std::array<float, 2>>);
+
+ PropertyValue<TranslateAnchorType> getIconTranslateAnchor() const;
+ void setIconTranslateAnchor(PropertyValue<TranslateAnchorType>);
+
+ PropertyValue<float> getTextOpacity() const;
+ void setTextOpacity(PropertyValue<float>);
+
+ PropertyValue<Color> getTextColor() const;
+ void setTextColor(PropertyValue<Color>);
+
+ PropertyValue<Color> getTextHaloColor() const;
+ void setTextHaloColor(PropertyValue<Color>);
+
+ PropertyValue<float> getTextHaloWidth() const;
+ void setTextHaloWidth(PropertyValue<float>);
+
+ PropertyValue<float> getTextHaloBlur() const;
+ void setTextHaloBlur(PropertyValue<float>);
+
+ PropertyValue<std::array<float, 2>> getTextTranslate() const;
+ void setTextTranslate(PropertyValue<std::array<float, 2>>);
+
+ PropertyValue<TranslateAnchorType> getTextTranslateAnchor() const;
+ void setTextTranslateAnchor(PropertyValue<TranslateAnchorType>);
+
+ // Private implementation
+
+ class Impl;
+ Impl* const impl;
+
+ SymbolLayer(const Impl&);
+ SymbolLayer(const SymbolLayer&) = delete;
+};
+
+template <>
+inline bool Layer::is<SymbolLayer>() const {
+ return type == Type::Symbol;
+}
+
+} // namespace style
+} // namespace mbgl