Releases: swhitty/SwiftDraw
Fix Default Gradient Stop Color
Fixes the default color for gradient stop-color
is not defined within a gradient.
RadialGradient Stroke
Adds ability to stroke a path with a radial gradient.
Enhances error logging to ensure it is logged to stderr
and includes details of erroneous SVG line / file where appropriate.
Image.Options
Adds Image.Options
to provide a way for the client to control how the SVG is rendered.
A single option is provided .hideUnsupportedFilters
which hides any SVG element that includes an unsupported filter. This option is not enabled by default. Images with unsupported filters render without the filter but log to stderr
with a platform specific hint pointing to the option;
Warning: <feGaussianBlur> is not supported. Elements with this filter can be hidden with UIImage(svgNamed: "yawn.svg", options: .hideUnsupportedFilters)
Warning: <feGaussianBlur> is not supported. Elements with this filter can be hidden with NSImage(svgNamed: "yawn.svg", options: .hideUnsupportedFilters)
Warning: <feGaussianBlur> is not supported. Elements with this filter can be hidden with [--hideUnsupportedFilters]
LinearGradient Stroke
Adds ability to stroke a path with a linear gradient.
RadialGradiant Improvements
Supports radial gradient focal points
RadialGradient
Initial support for radial gradients
Closed Path Location Fix
Last location of a closed path now correctly moves back to the start of the last unbroken segment.
currentColor
Adds support for the indirect currentColor
keyword.
initWithSVGData
Adds convenience initialisers to platform images;
UIImage(svgData: Data)
UIImage(contentsOfSVGFile path: String)
NSImage(svgData: Data)
NSImage(contentsOfSVGFile path: String)
And exports to Objective-C
- (instancetype) initWithSVGData: (NSData *)
- (instancetype) initWithContentsOfSVGFile: (NSString *)
Objective-C Extensions
Exports the UIImage
/ NSImage
extensions to Objective-C
Objective-C Extensions
Exports the UIImage
/ NSImage
extensions to Objective-C