Shape must have closed path for filling color.
if closed is skipped, it would take it's a line.
Change-Id: Ie1dcde9edbfc6501a34d6cb9ce54184ade6864db
_growOutlinePoint(*outline, outlinePtsCnt);
_growOutlineContour(*outline, outlineCntrsCnt);
+ auto closed = false;
+
//Generate Outlines
while (cmdCnt-- > 0) {
switch(*cmds) {
case PathCommand::Close: {
_outlineClose(*outline);
+ closed = true;
break;
}
case PathCommand::MoveTo: {
_outlineEnd(*outline);
+ if (closed) outline->opened = false;
+
//FIXME:
//outline->flags = SwOutline::FillRule::Winding;
shape2->cubicTo(cx + radius, cy + halfRadius, cx + halfRadius, cy + radius, cx, cy+ radius);
shape2->cubicTo(cx - halfRadius, cy + radius, cx - radius, cy + halfRadius, cx - radius, cy);
shape2->cubicTo(cx - radius, cy - halfRadius, cx - halfRadius, cy - radius, cx, cy - radius);
+ shape2->close();
shape2->fill(255, 0, 0, 255);
if (canvas->push(move(shape2)) != tvg::Result::Success) return;
//Terminate ThorVG Engine
tvg::Initializer::term(tvgEngine);
-}
\ No newline at end of file
+}
shape5->cubicTo(cx + radius, cy + halfRadius, cx + halfRadius, cy + radius, cx, cy+ radius);
shape5->cubicTo(cx - halfRadius, cy + radius, cx - radius, cy + halfRadius, cx - radius, cy);
shape5->cubicTo(cx - radius, cy - halfRadius, cx - halfRadius, cy - radius, cx, cy - radius);
+ shape5->close();
shape5->fill(127, 0, 0, 127);
scene2->push(move(shape5));
//Terminate ThorVG Engine
tvg::Initializer::term(tvgEngine);
-}
\ No newline at end of file
+}