Releases: swhitty/SwiftDraw
0.24.0 Small, Medium & Large Symbol Sizes
0.23.1
0.23.0
Updates the alignment of SFSymbols and left/right guides to precisely align to the supplied insets. When --insets auto
the left/ight guides are closer to official SFSymbols:

When --insets 10 20 10 20
are supplied, the left/right guides are now precisely aligned to these insets:

Pass the --legacy
option to use the original, less precise alignment logic from earlier SwiftDraw versions.
What's Changed
- Swift 6.2 Support by @swhitty in #82
- Handle empty Path definition by @ruslansokolov in #84
- Reduced Strictness when parsing rbg() colors by @swhitty in #87
- Precisely Align SFSymbols left and right to the guides by @swhitty in #88
- --legacy option by @swhitty in #89
- Command Line tool options are now kebab-case by @swhitty in #90
New Contributors
- @ruslansokolov made their first contribution in #84
Full Changelog: 0.22.0...0.23.0
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