Skip to content

Releases: swhitty/SwiftDraw

0.22.0 SwiftDOM / Swift 5.9

29 May 02:19
a195947
Compare
Choose a tag to compare

Drop support for Swift 5.8.

Moves all DOM files to new SwiftDOM module. All types are exposed with package access control so nothing can actually be used publicly.

What's Changed

  • Moving DOM files to SwiftDOM Module by @swhitty in #80
  • fix: visionos in podspec by @EyreFree in #81
  • SwiftDOM is now published to cocoapods

0.21.0 Swift 6 Language Mode

16 Apr 12:12
2a36e6c
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: 0.20.1...0.21.0

0.20.1 SwiftUI SVGView

23 Feb 11:28
90f94b8
Compare
Choose a tag to compare

SwiftUI

Adds native SwiftUI support with SVGView:

var body: some View {
    SVGView(named: "sample.svg")
        .aspectRatio(contentMode: .fit)
        .padding()
}

Pass a SVG instance for better performance:

var image: SVG

var body: some View {
    SVGView(svg: image)
}

Transformation

SVG is now a struct and gains the ability to transform the image, updating its size before rasterization:

let svg = SVG(name: "fish.svg")!   // 100x100 
    .expanded(left: 10, right: 10) // 120x100
    .scaled(2)                     // 240x200

imageView.image = svg.rasterize()  // 240x200

Note: @objc(SVGImage) has been removed. SVG is now a struct and incompatible with ObjectiveC. Users can write their own objc wrapper to continue use.

0.19.0 Nested SVG

19 Feb 08:55
a3553a4
Compare
Choose a tag to compare

Adds support for Nested <svg> images within an existing image #67

0.18.3 Fix quad and ARC path segments

14 Feb 07:35
2cfd97c
Compare
Choose a tag to compare

Includes 2 separate fixes for issues within Paths

  • Rendering issue with some Quad segments #63
  • Crash with some Arc segments #65

0.18.2 Fix clip-path transforms

11 Feb 09:36
feb12e3
Compare
Choose a tag to compare

Fixes transform when used within clip-path #61

0.18.1 Fix display: block

21 Nov 05:50
65d5db7
Compare
Choose a tag to compare

Adds support for:

  • display: block #53
  • Public init for SVG.Insets #56

🙏🏻 @alpennec

0.18.0 Swift 6 compiler support

13 Oct 22:52
fb79a0a
Compare
Choose a tag to compare

Adds support for Swift 6 compiler

Fixes rendering issues:

Swift 5.7 (iOS13+, macOS 10.15+)

24 May 21:44
a5c680f
Compare
Choose a tag to compare

Removes support for older OS and Swift versions.

SwiftDraw now supports:

  • Swift 5.7+
  • iOS 13+
  • macOS 10.15+

Fixes issue #40 where base64 images were not sized correctly.

Swift 5.7 (iOS12+, macOS 10.14+)

15 Nov 07:34
e28ad94
Compare
Choose a tag to compare

Removes support for older OS and Swift versions.

SwiftDraw now supports:

  • Swift 5.7+
  • iOS 12+
  • macOS 10.14+

Fixes issue #32 where some SFSymbols would not correctly wind evenodd paths.