shape: fixing 'pie' option

For a dashed arc with pie = 1 the closing line was missing.
This commit is contained in:
Mira Grudzinska 2020-10-01 03:19:48 +02:00 committed by Hermet Park
parent 48f1115b0b
commit 910d45d93f

View file

@ -170,7 +170,7 @@ Result Shape::appendArc(float cx, float cy, float radius, float startAngle, floa
if (pie) {
pImpl->path->moveTo(cx, cy);
pImpl->path->lineTo(start.x + cx, start.y + cy);
}else {
} else {
pImpl->path->moveTo(start.x + cx, start.y + cy);
}
@ -204,10 +204,7 @@ Result Shape::appendArc(float cx, float cy, float radius, float startAngle, floa
startAngle = endAngle;
}
if (pie) {
pImpl->path->moveTo(cx, cy);
pImpl->path->close();
}
if (pie) pImpl->path->close();
pImpl->flag |= RenderUpdateFlag::Path;
@ -388,4 +385,4 @@ StrokeJoin Shape::strokeJoin() const noexcept
if (!pImpl->stroke) return StrokeJoin::Bevel;
return pImpl->stroke->join;
}
}