Files
MapLibreParticleLab/include/mbgl/gfx/drawable_custom_layer_host_tweaker.hpp
pre-commit-ci[bot] 8bf3040da1 [pre-commit.ci] pre-commit autoupdate (#2192)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-03-13 12:39:57 +01:00

36 lines
742 B
C++

#pragma once
#include <mbgl/gfx/drawable_tweaker.hpp>
#include <mbgl/style/layers/custom_layer.hpp>
#include <memory>
#include <string>
namespace mbgl {
class PaintParameters;
namespace gfx {
class Drawable;
/**
Tweaker that enables drawing a CustomLayer via their CustomLayerHost
*/
class DrawableCustomLayerHostTweaker : public gfx::DrawableTweaker {
public:
DrawableCustomLayerHostTweaker(std::shared_ptr<style::CustomLayerHost> host_)
: host(host_) {}
~DrawableCustomLayerHostTweaker() override = default;
void init(Drawable&) override {};
void execute(Drawable&, const PaintParameters&) override;
protected:
std::shared_ptr<style::CustomLayerHost> host;
};
} // namespace gfx
} // namespace mbgl