diff options
author | Young Hahn <young@mapbox.com> | 2016-06-10 23:05:15 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-06-10 23:05:15 -0400 |
commit | ecd4aa14397ed081a521d8412557724e52f277f3 (patch) | |
tree | a04bca00190eba8f3f3947689ab6b7ff537e8946 /src/mbgl/geometry | |
parent | a8df0feb5414af2c16bfdae27431d779e4545dbe (diff) | |
download | qtlocation-mapboxgl-ecd4aa14397ed081a521d8412557724e52f277f3.tar.gz |
text-pitch-alignment (#5288)
* First pass at port of https://github.com/mapbox/mapbox-gl-js/pull/2668
* RotationAlignmentType => AlignmentType
* Handle undefined default value for text-pitch-alignment and implement inheritance for this value from text-rotation-alignment
* Update dependencies
* Move handling fo undefined default value out of camelize functions
Diffstat (limited to 'src/mbgl/geometry')
-rw-r--r-- | src/mbgl/geometry/icon_buffer.cpp | 3 | ||||
-rw-r--r-- | src/mbgl/geometry/icon_buffer.hpp | 2 | ||||
-rw-r--r-- | src/mbgl/geometry/text_buffer.cpp | 3 | ||||
-rw-r--r-- | src/mbgl/geometry/text_buffer.hpp | 2 |
4 files changed, 6 insertions, 4 deletions
diff --git a/src/mbgl/geometry/icon_buffer.cpp b/src/mbgl/geometry/icon_buffer.cpp index 101132ddbc..51a4aa69fd 100644 --- a/src/mbgl/geometry/icon_buffer.cpp +++ b/src/mbgl/geometry/icon_buffer.cpp @@ -6,7 +6,7 @@ namespace mbgl { -size_t IconVertexBuffer::add(int16_t x, int16_t y, float ox, float oy, int16_t tx, int16_t ty, float minzoom, float maxzoom, float labelminzoom) { +size_t IconVertexBuffer::add(int16_t x, int16_t y, float ox, float oy, int16_t tx, int16_t ty, float minzoom, float maxzoom, float labelminzoom, uint8_t labelangle) { const size_t idx = index(); void *data = addElement(); @@ -21,6 +21,7 @@ size_t IconVertexBuffer::add(int16_t x, int16_t y, float ox, float oy, int16_t t ubytes[8] /* tex */ = tx / 4; ubytes[9] /* tex */ = ty / 4; ubytes[10] /* labelminzoom */ = labelminzoom * 10; + ubytes[11] /* labelangle */ = labelangle; // a_data2 ubytes[12] /* minzoom */ = minzoom * 10; // 1/10 zoom levels: z16 == 160. diff --git a/src/mbgl/geometry/icon_buffer.hpp b/src/mbgl/geometry/icon_buffer.hpp index 0116686265..3a1d57ccd7 100644 --- a/src/mbgl/geometry/icon_buffer.hpp +++ b/src/mbgl/geometry/icon_buffer.hpp @@ -10,7 +10,7 @@ namespace mbgl { 16 > { public: - size_t add(int16_t x, int16_t y, float ox, float oy, int16_t tx, int16_t ty, float minzoom, float maxzoom, float labelminzoom); + size_t add(int16_t x, int16_t y, float ox, float oy, int16_t tx, int16_t ty, float minzoom, float maxzoom, float labelminzoom, uint8_t labelangle); }; diff --git a/src/mbgl/geometry/text_buffer.cpp b/src/mbgl/geometry/text_buffer.cpp index 1aa65146a4..382e87324d 100644 --- a/src/mbgl/geometry/text_buffer.cpp +++ b/src/mbgl/geometry/text_buffer.cpp @@ -6,7 +6,7 @@ namespace mbgl { -size_t TextVertexBuffer::add(int16_t x, int16_t y, float ox, float oy, uint16_t tx, uint16_t ty, float minzoom, float maxzoom, float labelminzoom) { +size_t TextVertexBuffer::add(int16_t x, int16_t y, float ox, float oy, uint16_t tx, uint16_t ty, float minzoom, float maxzoom, float labelminzoom, uint8_t labelangle) { const size_t idx = index(); void *data = addElement(); @@ -21,6 +21,7 @@ size_t TextVertexBuffer::add(int16_t x, int16_t y, float ox, float oy, uint16_t ubytes[8] /* tex */ = tx / 4; ubytes[9] /* tex */ = ty / 4; ubytes[10] /* labelminzoom */ = labelminzoom * 10; + ubytes[11] /* labelangle */ = labelangle; // a_data2 ubytes[12] /* minzoom */ = minzoom * 10; // 1/10 zoom levels: z16 == 160. diff --git a/src/mbgl/geometry/text_buffer.hpp b/src/mbgl/geometry/text_buffer.hpp index 8d7859fde2..c6b632c67e 100644 --- a/src/mbgl/geometry/text_buffer.hpp +++ b/src/mbgl/geometry/text_buffer.hpp @@ -13,7 +13,7 @@ class TextVertexBuffer : public Buffer < public: typedef int16_t vertex_type; - size_t add(int16_t x, int16_t y, float ox, float oy, uint16_t tx, uint16_t ty, float minzoom, float maxzoom, float labelminzoom); + size_t add(int16_t x, int16_t y, float ox, float oy, uint16_t tx, uint16_t ty, float minzoom, float maxzoom, float labelminzoom, uint8_t labelangle); }; |