@MaddTheSane -- I've fixed the SVGKit's gradient rendering in OS X. (Haven't tested on iOS yet). Hope you get a chance to check it out. Here's a little narrative of how I found out what the issues were.
Some SVG images I am using have a Gradient to make some screws look a little more realistic, and so I tried to figure out why the gradients weren't showing up when displayed on screen, and when rendered.
As far as being displayed on screen, the gradients weren't being scaled using the viewport, but only the view box. This meant that the SVGGradientLayers were never shrunk to the same size as the use may have inputed when setting the SVGKImage's size.
When it was time for the SVGGradientLayer to be rendered in -renderInContext:, it seems that the layer.mask property was interfering with the rendering process.
I've attached two images to show the results. The first a crop of the graphic that I'm using as it's displayed on screen. The second is the image in a PDF that was drawn using -renderInContext:.
@MaddTheSane -- I've fixed the SVGKit's gradient rendering in OS X. (Haven't tested on iOS yet). Hope you get a chance to check it out. Here's a little narrative of how I found out what the issues were.
Some SVG images I am using have a Gradient to make some screws look a little more realistic, and so I tried to figure out why the gradients weren't showing up when displayed on screen, and when rendered.
As far as being displayed on screen, the gradients weren't being scaled using the viewport, but only the view box. This meant that the SVGGradientLayers were never shrunk to the same size as the use may have inputed when setting the SVGKImage's size.
When it was time for the SVGGradientLayer to be rendered in -renderInContext:, it seems that the layer.mask property was interfering with the rendering process.
I've attached two images to show the results. The first a crop of the graphic that I'm using as it's displayed on screen. The second is the image in a PDF that was drawn using -renderInContext:.![screen shot 2014-12-21 at 14 23 51](https://cloud.githubusercontent.com/assets/7121337/5519505/3fedda20-891d-11e4-95a0-ce490df94be7.png)