From 8be135231d9efe41a3b12037518d02b36104e8cf Mon Sep 17 00:00:00 2001 From: Alexander Shalamov Date: Mon, 11 Mar 2019 10:26:19 +0200 Subject: [core] Add possibility of overriding paint properties inside format expression #14062 * [core] Add format override expression and formatted section to evaluation context * [core] Add textColor to TaggedString's formatted section * [core] Add FormatSectionOverrides and introduce overridable properties * [core] Populate symbol layer paint properties for text sections * [core] Add benchmark for style that uses text-color override * [core] Add unit test for FormatOverrideExpression * [core] Add unit test for FormatSectionOverrides --- src/mbgl/text/quads.hpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/mbgl/text/quads.hpp') diff --git a/src/mbgl/text/quads.hpp b/src/mbgl/text/quads.hpp index 44a35a5014..f41a4fec66 100644 --- a/src/mbgl/text/quads.hpp +++ b/src/mbgl/text/quads.hpp @@ -20,14 +20,16 @@ public: Point br_, Rect tex_, WritingModeType writingMode_, - Point glyphOffset_) + Point glyphOffset_, + size_t sectionIndex_ = 0) : tl(std::move(tl_)), tr(std::move(tr_)), bl(std::move(bl_)), br(std::move(br_)), tex(std::move(tex_)), writingMode(writingMode_), - glyphOffset(glyphOffset_) {} + glyphOffset(glyphOffset_), + sectionIndex(sectionIndex_){} Point tl; Point tr; @@ -36,6 +38,7 @@ public: Rect tex; WritingModeType writingMode; Point glyphOffset; + size_t sectionIndex; }; using SymbolQuads = std::vector; -- cgit v1.2.1