#pragma once #include "drape_frontend/map_shape.hpp" #include "drape_frontend/path_text_handle.hpp" #include "drape_frontend/shape_view_params.hpp" #include "drape_frontend/text_layout.hpp" #include "geometry/spline.hpp" #include #include namespace dp { class OverlayHandle; } // namespace dp namespace df { class PathTextShape : public MapShape { public: PathTextShape(m2::SharedSpline const & spline, PathTextViewParams const & params, TileKey const & tileKey, uint32_t baseTextIndex); bool CalculateLayout(ref_ptr textures); std::vector GetOffsets() const { return m_context->GetOffsets(); } void Draw(ref_ptr batcher, ref_ptr textures) const override; MapShapeType GetType() const override { return MapShapeType::OverlayType; } private: uint64_t GetOverlayPriority(uint32_t textIndex, size_t textLength) const; void DrawPathTextPlain(ref_ptr textures, ref_ptr batcher) const; void DrawPathTextOutlined(ref_ptr textures, ref_ptr batcher) const; drape_ptr CreateOverlayHandle(uint32_t textIndex, ref_ptr textures) const; m2::SharedSpline m_spline; PathTextViewParams m_params; m2::PointI const m_tileCoords; uint32_t const m_baseTextIndex; std::shared_ptr m_context; }; } // namespace df