#pragma once #include #include #include #include namespace mbgl { class Anchor; class IndexedSubfeature; struct ShapedTextOrientations { Shaping horizontal; Shaping vertical; // The following are used with variable text placement on. Shaping& right = horizontal; Shaping center; Shaping left; bool singleLine = false; }; class SymbolInstance { public: SymbolInstance(Anchor& anchor, GeometryCoordinates line, const ShapedTextOrientations& shapedTextOrientations, optional shapedIcon, const style::SymbolLayoutProperties::Evaluated&, const float layoutTextSize, const float textBoxScale, const float textPadding, style::SymbolPlacementType textPlacement, const std::array textOffset, const float iconBoxScale, const float iconPadding, const std::array iconOffset, const GlyphPositions&, const IndexedSubfeature&, const std::size_t layoutFeatureIndex, const std::size_t dataFeatureIndex, std::u16string key, const float overscaling, const float rotate, float radialTextOffset); optional getDefaultHorizontalPlacedTextIndex() const; Anchor anchor; GeometryCoordinates line; bool hasText; bool hasIcon; // Note: When singleLine == true, only `rightJustifiedGlyphQuads` is populated. SymbolQuads rightJustifiedGlyphQuads; SymbolQuads centerJustifiedGlyphQuads; SymbolQuads leftJustifiedGlyphQuads; SymbolQuads verticalGlyphQuads; optional iconQuad; CollisionFeature textCollisionFeature; CollisionFeature iconCollisionFeature; WritingModeType writingModes; std::size_t layoutFeatureIndex; // Index into the set of features included at layout time std::size_t dataFeatureIndex; // Index into the underlying tile data feature set std::array textOffset; std::array iconOffset; std::u16string key; bool isDuplicate; optional placedRightTextIndex; optional placedCenterTextIndex; optional placedLeftTextIndex; optional placedVerticalTextIndex; optional placedIconIndex; float textBoxScale; float radialTextOffset; bool singleLine; uint32_t crossTileID = 0; }; } // namespace mbgl