blob: f0f6ed4557ee75adec2006a5febbe01f0f2fd67d [file] [log] [blame]
#include "rive/shapes/paint/fill.hpp"
using namespace rive;
PathSpace Fill::pathSpace() const { return PathSpace::Local; }
RenderPaint* Fill::initRenderPaint(ShapePaintMutator* mutator)
{
auto renderPaint = Super::initRenderPaint(mutator);
renderPaint->style(RenderPaintStyle::fill);
return renderPaint;
}
void Fill::draw(Renderer* renderer, CommandPath* path)
{
if (!isVisible())
{
return;
}
auto renderPath = path->renderPath();
renderPath->fillRule((FillRule)fillRule());
renderer->drawPath(renderPath, m_RenderPaint);
}