blob: fc1727f03817a454ea9456189d7b8d14d62435fc [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