swhitty / SwiftDraw

Swift library and command line tool to convert SVGs into SFSymbol, PNG, PDF and Swift source code.
zlib License
326 stars 41 forks source link

SVG Files with No Stop and Xlink:href don't work #1

Closed leogdion closed 4 years ago

leogdion commented 4 years ago

Sample SVG File Attached apple.svg.zip

leogdion commented 4 years ago

I posted a start to a fix here: https://github.com/brightdigit/SwiftDraw/tree/feature/fix-references

swhitty commented 4 years ago

Thanks for reporting the issue @leogdion. I have pushed a localised fix that addresses just the LinearGradient case. I suppose I need to look at a more generalised solution as any element could possibly reference another def.

swhitty commented 4 years ago

Latest release https://github.com/swhitty/SwiftDraw/releases/tag/0.7.2

leogdion commented 4 years ago

Yeah the result doesn't seem to be have the gradient there. I'm wondering if it has to do with gradientUnits="userSpaceOnUse" which would throw off the gradient coordinates.

swhitty commented 3 years ago

Thanks @leogdion. 0.7.3 adds support for gradientUnits="userSpaceOnUse"