blob: d693baa3520e461a4bbaeb86705e8ced1227b575 [file] [log] [blame]
#include "rive/generated/drawable_base.hpp"
#include "rive/renderer.hpp"
#include <vector>
namespace rive {
class ClippingShape;
class Artboard;
class DrawRules;
class Drawable : public DrawableBase {
friend class Artboard;
std::vector<ClippingShape*> m_ClippingShapes;
/// Used exclusively by the artboard;
DrawRules* flattenedDrawRules = nullptr;
Drawable* prev = nullptr;
Drawable* next = nullptr;
BlendMode blendMode() const { return (BlendMode)blendModeValue(); }
bool clip(Renderer* renderer) const;
virtual void draw(Renderer* renderer) = 0;
void addClippingShape(ClippingShape* shape);
inline const std::vector<ClippingShape*>& clippingShapes() const {
return m_ClippingShapes;
const inline bool isHidden() const {
// For now we have a single drawable flag, when we have more we can
// make an actual enum for this.
return (drawableFlags() & 0x1) == 0x1;
} // namespace rive