-
Notifications
You must be signed in to change notification settings - Fork 247
Open
Labels
Description
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.
pagr