Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
34 lines
605 B
C++
34 lines
605 B
C++
#pragma once
|
|
|
|
#include <memory>
|
|
|
|
namespace mln {
|
|
|
|
class PaintParameters;
|
|
|
|
namespace gfx {
|
|
|
|
class Drawable;
|
|
|
|
/**
|
|
Base class for drawable tweakers, which manipulate drawables per frame
|
|
*/
|
|
class DrawableTweaker {
|
|
protected:
|
|
DrawableTweaker() = default;
|
|
|
|
public:
|
|
virtual ~DrawableTweaker() = default;
|
|
|
|
/// Called as the drawable gets added to the layer
|
|
virtual void init(Drawable&) = 0;
|
|
|
|
/// Called just before rendering
|
|
virtual void execute(Drawable&, PaintParameters&) = 0;
|
|
};
|
|
|
|
using DrawableTweakerPtr = std::shared_ptr<DrawableTweaker>;
|
|
|
|
} // namespace gfx
|
|
} // namespace mln
|