Skip to content

Releases: swhitty/SwiftDraw

Fix Default Gradient Stop Color

18 Aug 04:04
3ce2c41
Compare
Choose a tag to compare

Fixes the default color for gradient stop-color is not defined within a gradient.

RadialGradient Stroke

17 Aug 07:47
21d4520
Compare
Choose a tag to compare

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

16 Aug 00:49
4dddf4b
Compare
Choose a tag to compare

Adds ability to stroke a path with a linear gradient.

RadialGradiant Improvements

14 Aug 23:58
09cbb08
Compare
Choose a tag to compare

Supports radial gradient focal points

RadialGradient

13 Aug 01:46
d25f77c
Compare
Choose a tag to compare

Initial support for radial gradients

Closed Path Location Fix

03 Aug 23:03
8c70031
Compare
Choose a tag to compare

Last location of a closed path now correctly moves back to the start of the last unbroken segment.

currentColor

30 Jul 02:50
d072941
Compare
Choose a tag to compare

Adds support for the indirect currentColor keyword.

initWithSVGData

24 Jul 00:07
e5a809b
Compare
Choose a tag to compare

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

11 Jul 21:04
d214eef
Compare
Choose a tag to compare

Exports the UIImage / NSImage extensions to Objective-C

Objective-C Extensions

11 Jul 07:56
863707a
Compare
Choose a tag to compare

Exports the UIImage / NSImage extensions to Objective-C