Releases: swhitty/SwiftDraw
0.22.0 SwiftDOM / Swift 5.9
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
0.21.0 Swift 6 Language Mode
What's Changed
- Swift 6 Language Mode by @swhitty in #78
- SVG is Sendable by @swhitty in #77
- Convert recursive functions to iterative traversal by @swhitty in #76
- Android support by @marcprux in #75
- Accept missing namespace by @swhitty in #74
- Update GitHub Actions for Swift 6.1 by @swhitty in #79
New Contributors
Full Changelog: 0.20.1...0.21.0
0.20.1 SwiftUI SVGView
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 astruct
and incompatible with ObjectiveC. Users can write their own objc wrapper to continue use.
0.19.0 Nested SVG
Adds support for Nested <svg>
images within an existing image #67
0.18.3 Fix quad and ARC path segments
0.18.2 Fix clip-path transforms
Fixes transform when used within clip-path
#61
0.18.1 Fix display: block
0.18.0 Swift 6 compiler support
Swift 5.7 (iOS13+, macOS 10.15+)
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+)
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.