Organic Maps sources as of 02.04.2025 (fad26bbf22ac3da75e01e62aa01e5c8e11861005)

To expand with full Organic Maps and Maps.ME commits history run:
  git remote add om-historic [om-historic.git repo url]
  git fetch --tags om-historic
  git replace squashed-history historic-commits
This commit is contained in:
Konstantin Pastbin
2025-04-13 16:37:30 +07:00
commit e3e4a1985a
12931 changed files with 13195100 additions and 0 deletions

View File

@@ -0,0 +1,51 @@
#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 <memory>
#include <vector>
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<dp::TextureManager> textures);
std::vector<double> GetOffsets() const { return m_context->GetOffsets(); }
void Draw(ref_ptr<dp::GraphicsContext> context, ref_ptr<dp::Batcher> batcher,
ref_ptr<dp::TextureManager> 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<dp::GraphicsContext> context,
ref_ptr<dp::TextureManager> textures,
ref_ptr<dp::Batcher> batcher) const;
void DrawPathTextOutlined(ref_ptr<dp::GraphicsContext> context,
ref_ptr<dp::TextureManager> textures,
ref_ptr<dp::Batcher> batcher) const;
drape_ptr<dp::OverlayHandle> CreateOverlayHandle(uint32_t textIndex,
ref_ptr<dp::TextureManager> textures) const;
m2::SharedSpline m_spline;
PathTextViewParams m_params;
m2::PointI const m_tileCoords;
uint32_t const m_baseTextIndex;
std::shared_ptr<PathTextContext> m_context;
};
} // namespace df