summaryrefslogtreecommitdiff
path: root/include/llmr/renderer/painter.hpp
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2014-05-13 19:02:22 +0200
committerKonstantin Käfer <mail@kkaefer.com>2014-05-14 10:31:57 +0200
commit351453871995fcac42fdbb02aa281e3ca9cf26f1 (patch)
tree93b0ff6bb67018a9d28179be3365d7dba3267ca2 /include/llmr/renderer/painter.hpp
parent32b21b050fe66c688d9b21f86197b8ac4cfaefdf (diff)
downloadqtlocation-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.hpp4
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);