Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compound path drawing seems to fail for any circular subpath #45

Open
Gambloide opened this issue Dec 28, 2023 · 0 comments
Open

compound path drawing seems to fail for any circular subpath #45

Gambloide opened this issue Dec 28, 2023 · 0 comments

Comments

@Gambloide
Copy link

Gambloide commented Dec 28, 2023

Preface
I am very inexperienced when it comes to parsing svg-definitions and am not really familiar with the spec, so I apologize if I am completely misunderstanding what is happening here or I use the wrong terminology.

Issue
Any circular sub-path enclosed by an arbitrary different path is not rendered properly.
Examples (left svg rendered by browser, right by oksvg):
2023-12-28 14_19_55-
2023-12-28 14_21_45-
These examples only use a path-object with z, Z, m, M and a operators inside a viewbox.

Steps to Reproduce
Add either the following minimal example (circle with donut-hole) or any svg from fontawesome.com with a hole as a svg-file to the existing testdata folder of oksvg add the reference to the file in svgdraw_test.go:

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="#000000" d="M256 512a256 256 0 1 0 0-512 256 256 0 1 0 0 512zm0-352a96 96 0 1 1 0 192 96 96 0 1 1 0-192z"/></svg>

Specifically tested and incorrectly rendered files from fontawesome:

Steps Taken
I got a local development environment for oksvg running and fiddled with the svg-files themselves as well as the code handling z, Z, m and M. I assumed it might be an edge-case for handling the closing of arcs that was misbehaving, but failed to identify anything meaningful.

Notes

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

No branches or pull requests

1 participant