diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2014-09-04 18:12:40 -0700 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2014-09-04 18:12:40 -0700 |
commit | 7b9ad022a904110eb15260b2cbf56e6f6b8a03cf (patch) | |
tree | 6715b0dc08fa8f4b0a4aad3c705a6c6b6cc11d45 /src | |
parent | f2391e25ea8162562a6b355a9df8473193be88c3 (diff) | |
download | qtlocation-mapboxgl-7b9ad022a904110eb15260b2cbf56e6f6b8a03cf.tar.gz |
Implement text-rotation-alignment
Diffstat (limited to 'src')
-rw-r--r-- | src/renderer/painter_symbol.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/renderer/painter_symbol.cpp b/src/renderer/painter_symbol.cpp index 4748a75b05..7ab8edfb40 100644 --- a/src/renderer/painter_symbol.cpp +++ b/src/renderer/painter_symbol.cpp @@ -24,6 +24,16 @@ void Painter::renderSymbol(SymbolBucket &bucket, std::shared_ptr<StyleLayer> lay mat4 exMatrix; matrix::copy(exMatrix, projMatrix); + + const float angleOffset = + bucket.properties.text.rotation_alignment == RotationAlignmentType::Map + ? map.getState().getAngle() + : 0; + + if (angleOffset) { + matrix::rotate_z(exMatrix, exMatrix, angleOffset); + } + if (bucket.properties.placement == PlacementType::Line) { matrix::rotate_z(exMatrix, exMatrix, map.getState().getAngle()); } |