Skip to content

Fix the radius of half-size circles in SVG path output - #442

Open
bug-origin wants to merge 1 commit into
lincolnloop:mainfrom
bug-origin:fix/svg-circle-path-radius
Open

bug-origin wants to merge 1 commit into
lincolnloop:mainfrom
bug-origin:fix/svg-circle-path-radius

Conversation

@bug-origin

Copy link
Copy Markdown

Closes #441.

The endpoints of each circular SVG subpath already include the inset for size_ratio. Its radius was reduced by that inset a second time. At a ratio of 0.5 this produced zero-radius arcs between distinct endpoints and the circles disappeared.

Use half the drawn module width for each arc, as the element-based circle drawer does. The new regression test checks the half-size case.

Rendered the example from the issue at 290×290 using resvg. The path-based output went from zero to 6,376 nontransparent pixels, with the same visible bounds as the element-based output. The Python 3.13 test suite passed (98 passed, one skipped). Local Ruff lint and format checks reported the same findings on main and the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Half-size circles disappear from path-based SVG output

1 participant