Skip to content

Draw zero-radius SVG arcs as lines to their absolute end point - #2975

Closed
ozenyunus35 wants to merge 1 commit into
Kozea:mainfrom
ozenyunus35:fix/svg-zero-radius-arc
Closed

ozenyunus35 wants to merge 1 commit into
Kozea:mainfrom
ozenyunus35:fix/svg-zero-radius-arc

Conversation

@ozenyunus35

@ozenyunus35 ozenyunus35 commented Oct 14, 2026 •

Copy link
Copy Markdown

Fix #2974.

When an arc has rx or ry equal to 0, the path code replaces it with a line to the arc's end point. That end point is already absolute at this point (it's converted for a just above), but the replacement used the relative l command, so the line was drawn to the wrong place. It now uses L.

Added test_path_a_zero_radius: a rectangle drawn with two zero-radius arcs (one with rx = ry = 0, one with only rx = 0). It fails without the fix and passes with it. tests/draw/svg/test_paths.py passes.

I used an AI assistant to help draft parts of the code and tests; I reviewed the changes and ran the tests myself.

@ozenyunus35

Copy link
Copy Markdown
Author

Sorry, I opened this as a draft by mistake, and GitHub doesn't let me mark it as ready for review. Could you switch it to ready? It's ready to be reviewed.

@grewn0uille

Copy link
Copy Markdown
Member

There is a limit of 1pr opened per user.

Also there are guidelines. I'm sure you're able to read that 5 bullet points all by yourself.

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.

SVG path: arc with zero radius is drawn as a relative line since 70.0

2 participants