exyte / Macaw

Powerful and easy-to-use vector graphics Swift library with SVG support
MIT License
6.01k stars 554 forks source link

Wrong SVG rendering #632

Open sam-moshenko opened 4 years ago

sam-moshenko commented 4 years ago

This SVG file is rendered with errors: http://s000.tinyupload.com/?file_id=51455686831478467750 The image shows how Macaw displays it(top), and how it should be(bottom): image I see two problems here:

  1. Gradient is rendered just as plain black, not green to white as it should be
  2. Path of the gradient is wrong, it should go all the way to the bottom instead of going right from end of path to beginning

Is there any workarounds these errors? Will it be fixed?

thanks for the Cocoapod anyway, it is pretty cool

amarunko commented 4 years ago

Hi, @sam-moshenko, one of the problems related to the wrong gradient stops parsing, I will try to fix this soon, also you can always help by sending a PR.

amarunko commented 4 years ago

Fix for gradient stops - https://github.com/exyte/Macaw/pull/638

ystrot commented 4 years ago

After merging PR linear gradient parsed correctly, but black parts are still there. Looks like a rendering issue.

amarunko commented 4 years ago

Honestly, I didn't find any white fill for all SVG/Group, only fill = "none", which one btw not parsed, but shouldn't affect anything for this SVG, maybe I missed something.

miguelc95 commented 3 years ago

Maybe this is too late but I had the same issue and adding a transparent fill to the path in the SVG solved the problem