Update rive-cpp to 2.0 version
[platform/core/uifw/rive-tizen.git] / submodule / rive-cpp / src / shapes / paint / fill.cpp
1 #include "rive/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     auto renderPaint = Super::initRenderPaint(mutator);
9     renderPaint->style(RenderPaintStyle::fill);
10     return renderPaint;
11 }
12
13 void Fill::draw(Renderer* renderer, CommandPath* path) {
14     if (!isVisible()) {
15         return;
16     }
17     auto renderPath = path->renderPath();
18     renderPath->fillRule((FillRule)fillRule());
19     renderer->drawPath(renderPath, renderPaint());
20 }