summaryrefslogtreecommitdiff
path: root/src/mbgl/style/layers/symbol_layer_impl.cpp
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2016-09-26 12:53:32 -0700
committerJohn Firebaugh <john.firebaugh@gmail.com>2016-10-28 17:14:01 -0700
commit0e57d10d77e555a9229f7d522d83f87df7d5180d (patch)
tree2a3c3b0dd4ed6edf385ba8d390d919e469b7a96a /src/mbgl/style/layers/symbol_layer_impl.cpp
parenta4c82b8a3b5e48f3bbccf32be80d45ca78d51515 (diff)
downloadqtlocation-mapboxgl-0e57d10d77e555a9229f7d522d83f87df7d5180d.tar.gz
[core] Modern C++ bindings for OpenGL
Diffstat (limited to 'src/mbgl/style/layers/symbol_layer_impl.cpp')
-rw-r--r--src/mbgl/style/layers/symbol_layer_impl.cpp34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/mbgl/style/layers/symbol_layer_impl.cpp b/src/mbgl/style/layers/symbol_layer_impl.cpp
index e85f3a90f9..0ac9ff832d 100644
--- a/src/mbgl/style/layers/symbol_layer_impl.cpp
+++ b/src/mbgl/style/layers/symbol_layer_impl.cpp
@@ -76,5 +76,39 @@ std::unique_ptr<SymbolLayout> SymbolLayer::Impl::createLayout(BucketParameters&
*spriteAtlas);
}
+SymbolPropertyValues SymbolLayer::Impl::iconPropertyValues(const SymbolLayoutProperties& layout_) const {
+ return SymbolPropertyValues {
+ layout_.iconRotationAlignment.value, // icon-pitch-alignment is not yet implemented; inherit the rotation alignment
+ layout_.iconRotationAlignment.value,
+ layout_.iconSize.value,
+ paint.iconOpacity.value,
+ paint.iconColor.value,
+ paint.iconHaloColor.value,
+ paint.iconHaloWidth.value,
+ paint.iconHaloBlur.value,
+ paint.iconTranslate.value,
+ paint.iconTranslateAnchor.value,
+ iconSize,
+ 1.0f
+ };
+}
+
+SymbolPropertyValues SymbolLayer::Impl::textPropertyValues(const SymbolLayoutProperties& layout_) const {
+ return SymbolPropertyValues {
+ layout_.textPitchAlignment.value,
+ layout_.textRotationAlignment.value,
+ layout_.textSize.value,
+ paint.textOpacity.value,
+ paint.textColor.value,
+ paint.textHaloColor.value,
+ paint.textHaloWidth.value,
+ paint.textHaloBlur.value,
+ paint.textTranslate.value,
+ paint.textTranslateAnchor.value,
+ textSize,
+ 24.0f
+ };
+}
+
} // namespace style
} // namespace mbgl