diff options
author | Ansis Brammanis <brammanis@gmail.com> | 2017-06-16 10:42:33 -0400 |
---|---|---|
committer | Ansis Brammanis <brammanis@gmail.com> | 2017-07-11 09:10:24 -0700 |
commit | e514138b691615be24f484986c40f486223df82a (patch) | |
tree | 4cab221d92f66feefd132818a700c47cc67ef245 /src/mbgl/layout/symbol_layout.hpp | |
parent | 77734cfe1b9e77a0058fa3e0db79e3c20a264165 (diff) | |
download | qtlocation-mapboxgl-e514138b691615be24f484986c40f486223df82a.tar.gz |
[core] improve legibility of labels that follow lines
port https://github.com/mapbox/mapbox-gl-js/pull/4781
This improves legibility of labels that follow lines in pitched views.
The previous approach used the limited information in the shader to
calculate put the glyph in approximatelyright place. The new approach
does this more accurately by doing it on the cpu where we have access to
the entire line geometry.
Diffstat (limited to 'src/mbgl/layout/symbol_layout.hpp')
-rw-r--r-- | src/mbgl/layout/symbol_layout.hpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/mbgl/layout/symbol_layout.hpp b/src/mbgl/layout/symbol_layout.hpp index 5dc0f3eb76..90f5b3c91d 100644 --- a/src/mbgl/layout/symbol_layout.hpp +++ b/src/mbgl/layout/symbol_layout.hpp @@ -20,6 +20,7 @@ class CollisionTile; class SymbolBucket; class Anchor; class RenderLayer; +class PlacedSymbol; namespace style { class Filter; @@ -58,15 +59,13 @@ private: // Adds placed items to the buffer. template <typename Buffer> void addSymbol(Buffer&, - SymbolSizeBinder& sizeBinder, + const Range<float> sizeData, const SymbolQuad&, - const SymbolFeature& feature, float scale, const bool keepUpright, const style::SymbolPlacementType, - const float placementAngle, - WritingModeType writingModes, - const Point<float> labelAnchor); + const Anchor& labelAnchor, + PlacedSymbol& placedSymbol); // Stores the layer so that we can hold on to GeometryTileFeature instances in SymbolFeature, // which may reference data from this object. |