diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2014-07-09 18:43:28 -0700 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2014-07-09 18:43:28 -0700 |
commit | d9bebe84a50141f4a11299e501c3b4ff65106dea (patch) | |
tree | ccc00ee5ab03eed6d7ec6b278810ad7038f5db8b /include/llmr/style | |
parent | cd69784edb7031bb0de530d3779d3c6b1690ebb0 (diff) | |
download | qtlocation-mapboxgl-d9bebe84a50141f4a11299e501c3b4ff65106dea.tar.gz |
move render type to layer top level
refs https://github.com/mapbox/mapbox-gl-style-spec/issues/80
Diffstat (limited to 'include/llmr/style')
-rw-r--r-- | include/llmr/style/style_bucket.hpp | 3 | ||||
-rw-r--r-- | include/llmr/style/style_layer.hpp | 2 | ||||
-rw-r--r-- | include/llmr/style/types.hpp | 13 |
3 files changed, 11 insertions, 7 deletions
diff --git a/include/llmr/style/style_bucket.hpp b/include/llmr/style/style_bucket.hpp index b963caba80..55ffeeb18e 100644 --- a/include/llmr/style/style_bucket.hpp +++ b/include/llmr/style/style_bucket.hpp @@ -71,7 +71,8 @@ class StyleBucket { public: typedef std::shared_ptr<StyleBucket> Ptr; - BucketType type = BucketType::None; + StyleBucket(StyleLayerType type); + std::string name; std::shared_ptr<Source> source; std::string source_layer; diff --git a/include/llmr/style/style_layer.hpp b/include/llmr/style/style_layer.hpp index 5d8215cf0e..4d6b8d1fa8 100644 --- a/include/llmr/style/style_layer.hpp +++ b/include/llmr/style/style_layer.hpp @@ -61,6 +61,8 @@ public: // The name of this layer. const std::string id; + StyleLayerType type = StyleLayerType::Unknown; + // Bucket information, telling the renderer how to generate the geometries // for this layer (feature property filters, tessellation instructions, ...). std::shared_ptr<StyleBucket> bucket; diff --git a/include/llmr/style/types.hpp b/include/llmr/style/types.hpp index fd862c00d4..fc0cc99abb 100644 --- a/include/llmr/style/types.hpp +++ b/include/llmr/style/types.hpp @@ -9,19 +9,20 @@ namespace llmr { // Stores a premultiplied color, with all four channels ranging from 0..1 typedef std::array<float, 4> Color; -enum class BucketType : uint8_t { - None, +enum class StyleLayerType : uint8_t { + Unknown, Fill, Line, Icon, Text, Raster, - Default = None + Composite, + Background }; -BucketType parseBucketType(const std::string &type); -const char *stringifyBucketType(BucketType type); -std::ostream& operator<<(std::ostream&, BucketType type); +StyleLayerType parseStyleLayerType(const std::string &type); +const char *stringifyStyleLayerType(StyleLayerType type); +std::ostream& operator<<(std::ostream&, StyleLayerType type); enum class WindingType : uint8_t { |