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

Gradient Fill support #86

Open
SuperWomble opened this issue Apr 3, 2017 · 2 comments
Open

Gradient Fill support #86

SuperWomble opened this issue Apr 3, 2017 · 2 comments
Assignees

Comments

@SuperWomble
Copy link

SuperWomble commented Apr 3, 2017

Please consider adding Gradient support to PocketSVG.

Right now, Gradients cause a crash due to expectation of fill color values instead of fill URLs.

e.g. if I create a radial Gradient in Sketch, the resulting SVG contains the following def:

 <defs>
        <radialGradient cx="50%" cy="50%" fx="50%" fy="50%" r="86.5418155%" id="radialGradient-1">
            <stop stop-color="#00FFCC" offset="0%"></stop>
            <stop stop-color="#005B38" offset="100%"></stop>
        </radialGradient>
    </defs>

The drawing path then refers to that gradient via a url on the fill attribute:

<path d="..." id="Inner-Color" fill="url(#radialGradient-1)"></path>

PocketSVG is choking on the fill's value, as it's expecting the start of a hex triplet, but is instead finding "url(..."

Assertion failure in hexTriplet::hexTriplet(NSString *__strong)(), ... PocketSVG-master/SVGEngine.mm:669

Cheers. And thanks again for all the hard work.

@fjolnir
Copy link
Member

fjolnir commented Apr 3, 2017

This would be a large task, mainly because gradients can't be inlined into the path tag. I won't rule it out, but don't hold your breath.

@SuperWomble
Copy link
Author

OK, big thanks.

@fjolnir fjolnir self-assigned this Apr 3, 2017
@fjolnir fjolnir changed the title Feature Request: Gradient Fill support Gradient Fill support Apr 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants