submodule: add rive-cpp to rive-tizen as submodule
[platform/core/uifw/rive-tizen.git] / submodule / src / shapes / paint / fill.cpp
1 #include "shapes/paint/fill.hpp"
2
3 using namespace rive;
4
5 PathSpace Fill::pathSpace() const { return PathSpace::Local; }
6
7 RenderPaint* Fill::initRenderPaint(ShapePaintMutator* mutator)
8 {
9         auto renderPaint = Super::initRenderPaint(mutator);
10         renderPaint->style(RenderPaintStyle::fill);
11         return renderPaint;
12 }
13
14 void Fill::draw(Renderer* renderer, CommandPath* path)
15 {
16         if (!isVisible())
17         {
18                 return;
19         }
20         auto renderPath = path->renderPath();
21         renderPath->fillRule((FillRule)fillRule());
22         renderer->drawPath(renderPath, m_RenderPaint);
23 }