#pragma once #include "drape_frontend/map_shape.hpp" #include "drape_frontend/shape_view_params.hpp" #include "drape/binding_info.hpp" #include "drape/glstate.hpp" #include "geometry/spline.hpp" #include "std/unique_ptr.hpp" namespace df { class ILineShapeInfo { public: virtual ~ILineShapeInfo() {} virtual dp::BindingInfo const & GetBindingInfo() = 0; virtual dp::GLState GetState() = 0; virtual ref_ptr GetLineData() = 0; virtual size_t GetLineSize() = 0; virtual ref_ptr GetJoinData() = 0; virtual size_t GetJoinSize() = 0; virtual dp::BindingInfo const & GetCapBindingInfo() = 0; virtual dp::GLState GetCapState() = 0; virtual ref_ptr GetCapData() = 0; virtual size_t GetCapSize() = 0; }; class LineShape : public MapShape { public: LineShape(m2::SharedSpline const & spline, LineViewParams const & params); void Prepare(ref_ptr textures) const override; void Draw(ref_ptr batcher, ref_ptr textures) const override; private: template void Construct(TBuilder & builder) const; bool CanBeSimplified(int & lineWidth) const; LineViewParams m_params; m2::SharedSpline m_spline; mutable unique_ptr m_lineShapeInfo; mutable bool m_isSimple; }; } // namespace df