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

Fix/Incorect svg arc parsing #2345

Merged
merged 2 commits into from Dec 19, 2018

Conversation

Calabaraburus
Copy link
Contributor

@Calabaraburus Calabaraburus commented Oct 24, 2018

Current version incorrectly imports paths of svg file if path contains arcs that can't be split on 90deg segments

svg: https://yadi.sk/d/bCYLumnmJbLhgg

Original svg image:
2018-10-24_19-06-31

Importing to OpenToonz:
2018-10-24_19-03-09

After fix:
2018-10-24_19-08-51

Натальчишин Тарас Анатольевич added 2 commits October 24, 2018 16:45
@ghost
Copy link

ghost commented Oct 24, 2018

Thanks a ton. SVG definitely needs some love.

@RodneyBaker
Copy link
Collaborator

RodneyBaker commented Oct 24, 2018

Thank you @Calabaraburus.
I tested the appveyor and it works as described.

As @turtleTooth stated, the attention on SVG is appreciated.

Aside: The most obvious issue I see with SVG at this point is the improper scaling upon import.
I'm not sure if it's DPI related but that seems to be a likely candidate as SVG being a vector format it doesn't have a DPI setting. With OpenToonz possibly factoring DPI in for initial resolution that might make the difference.

Added: One thing I note with this addition is that Control Points appear to be kept to a minimum. Nice!

@artisteacher
Copy link
Contributor

Thanks @Calabaraburus for tackling svg! I was testing with one of my own svg & found there is still some visual distortion.

This svg should look like this:
screen shot 2018-10-25 at 8 56 56 pm
But looks like this:
screen shot 2018-10-25 at 8 58 16 pm
There are actually 3 issues here - the slight distortion in the shape, the stroke issue is reported in #1009, and the missing fill in #1795, #119.

test.svg.zip

@shun-iwasawa
Copy link
Member

Jenkins

@shun-iwasawa
Copy link
Member

It works fine. Thank you @Calabaraburus for the fix! LGTM

@shun-iwasawa shun-iwasawa merged commit 676b4b2 into opentoonz:master Dec 19, 2018
@RodneyBaker
Copy link
Collaborator

Watching this as the code is said to be merged but haven't been able to confirm the fix yet in a nightly build.

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.

None yet

4 participants