[core] Fix combination of icon-text-fit with text-variable-anchors and text-writing-mode

This commit is contained in:
Alexander Shalamov
2019-08-08 13:56:22 +03:00
parent 073a243862
commit 9ba700fd47
15 changed files with 344 additions and 184 deletions

View File

@@ -4,6 +4,7 @@
#include <mbgl/text/tagged_string.hpp>
#include <mbgl/renderer/image_atlas.hpp>
#include <mbgl/style/types.hpp>
#include <mbgl/style/layers/symbol_layer_properties.hpp>
namespace mbgl {
@@ -52,6 +53,12 @@ public:
style::SymbolAnchorType iconAnchor,
const float iconRotation);
// Updates shaped icon's bounds based on shaped text's bounds and provided
// layout properties.
void fitIconToText(const style::SymbolLayoutProperties::Evaluated& layout,
const Shaping& shapedText,
float layoutTextSize);
const ImagePosition& image() const { return _image; }
float top() const { return _top; }
float bottom() const { return _bottom; }