1 #include "drawable.hpp"
2 #include "artboard.hpp"
3 #include "shapes/clipping_shape.hpp"
4 #include "shapes/path_composer.hpp"
5 #include "shapes/shape.hpp"
9 void Drawable::addClippingShape(ClippingShape* shape)
11 m_ClippingShapes.push_back(shape);
14 bool Drawable::clip(Renderer* renderer) const
16 if (m_ClippingShapes.size() == 0)
23 for (auto clippingShape : m_ClippingShapes)
25 if (!clippingShape->isVisible())
30 RenderPath* renderPath = clippingShape->renderPath();
32 assert(renderPath != nullptr);
33 renderer->clipPath(renderPath);