diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2014-05-13 19:02:22 +0200 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2014-05-14 10:31:57 +0200 |
commit | 351453871995fcac42fdbb02aa281e3ca9cf26f1 (patch) | |
tree | 93b0ff6bb67018a9d28179be3365d7dba3267ca2 /include/llmr/renderer/painter.hpp | |
parent | 32b21b050fe66c688d9b21f86197b8ac4cfaefdf (diff) | |
download | qtlocation-mapboxgl-351453871995fcac42fdbb02aa281e3ca9cf26f1.tar.gz |
make text layers respect the translate-anchor
you can now specify "translate-anchor": "viewport" to have the text translated
in screen coordinates rather than relative to the tile. The default value
remains "translate-anchor": "map"
refs #189
Diffstat (limited to 'include/llmr/renderer/painter.hpp')
-rw-r--r-- | include/llmr/renderer/painter.hpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/llmr/renderer/painter.hpp b/include/llmr/renderer/painter.hpp index 5dbc971430..2aa0353ca9 100644 --- a/include/llmr/renderer/painter.hpp +++ b/include/llmr/renderer/painter.hpp @@ -7,6 +7,7 @@ #include <llmr/util/mat4.hpp> #include <llmr/util/noncopyable.hpp> #include <llmr/renderer/frame_history.hpp> +#include <llmr/style/properties.hpp> #include <llmr/shader/plain_shader.hpp> #include <llmr/shader/outline_shader.hpp> @@ -88,7 +89,8 @@ public: bool needsAnimation() const; private: void setupShaders(); - void translateLayer(std::array<float, 2> translation, const Tile::ID &id, bool reverse = false); + void translateLayer(const std::array<float, 2> &translation, const Tile::ID &id, bool reverse = false); + mat4 translatedMatrix(const std::array<float, 2> &translation, const Tile::ID &id, TranslateAnchor anchor = TranslateAnchor::Map); void prepareTile(const Tile& tile); void useProgram(uint32_t program); |