First, thanks for the library. It's been quite helpful.
I'm using SwiftDraw to render a SVGs that are user uploaded. I noticed a problem with SVGs that have base64 encoded image data embedded in them. They're getting cut off no matter how I seem to configure it.
Most SVGs work just fine. A few, this one included, get clipped. Any thoughts on this?
let svgURL = URL(string: "https://ps.w.org/independent-analytics/assets/icon.svg")!
let svg = SVG(fileURL: svgURL)
let desiredSize = CGSize(width: 96, height: 96)
self.image = svg?.rasterize(with: desiredSize) // I've also tried with no "with"
Hey, Simon.
First, thanks for the library. It's been quite helpful.
I'm using SwiftDraw to render a SVGs that are user uploaded. I noticed a problem with SVGs that have base64 encoded image data embedded in them. They're getting cut off no matter how I seem to configure it.
Most SVGs work just fine. A few, this one included, get clipped. Any thoughts on this?
Thanks!
Original SVG:
icon.svg.zip
SwiftDraw rendered version
Demo code I'm working with: