mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-08 05:33:36 +00:00
shape: fixing 'pie' option
For a dashed arc with pie = 1 the closing line was missing.
This commit is contained in:
parent
48f1115b0b
commit
910d45d93f
1 changed files with 3 additions and 6 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue