mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-10 06:34:01 +00:00
common: Changing the circle/ellipse starting point
According to the SVG standard, drawing a circle/ellipse should start at the '3 o'clock' position and proceed in a clock-wise direction. Until now, this point was set at '12 o'clock'. The differences in the outcome were visible for dashed strokes. issue: https://github.com/thorvg/thorvg/issues/1686
This commit is contained in:
parent
8b2ddf7377
commit
6ec88ed486
1 changed files with 2 additions and 2 deletions
|
@ -130,11 +130,11 @@ Result Shape::appendCircle(float cx, float cy, float rx, float ry) noexcept
|
|||
auto ryKappa = ry * PATH_KAPPA;
|
||||
|
||||
pImpl->grow(6, 13);
|
||||
pImpl->moveTo(cx, cy - ry);
|
||||
pImpl->cubicTo(cx + rxKappa, cy - ry, cx + rx, cy - ryKappa, cx + rx, cy);
|
||||
pImpl->moveTo(cx + rx, cy);
|
||||
pImpl->cubicTo(cx + rx, cy + ryKappa, cx + rxKappa, cy + ry, cx, cy + ry);
|
||||
pImpl->cubicTo(cx - rxKappa, cy + ry, cx - rx, cy + ryKappa, cx - rx, cy);
|
||||
pImpl->cubicTo(cx - rx, cy - ryKappa, cx - rxKappa, cy - ry, cx, cy - ry);
|
||||
pImpl->cubicTo(cx + rxKappa, cy - ry, cx + rx, cy - ryKappa, cx + rx, cy);
|
||||
pImpl->close();
|
||||
|
||||
return Result::Success;
|
||||
|
|
Loading…
Add table
Reference in a new issue