Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
170 commits
Select commit Hold shift + click to select a range
040031e
Correctly handle image sizes
swhitty May 24, 2024
5bda33c
Merge pull request #41 from swhitty/fix-image-size
swhitty May 24, 2024
a5c680f
0.17.0
swhitty May 24, 2024
8cc5324
Fix: use should find any element
swhitty Jun 12, 2024
a7f67cf
Merge pull request #44 from swhitty/use-find-any-element
swhitty Jun 12, 2024
3e88354
watchOS
swhitty Jun 16, 2024
b88dbf1
0.18.0
swhitty Jun 16, 2024
b917e2a
Update README.md
swhitty Jun 16, 2024
b425da7
Support absolute units when parsing SVG
swhitty Jun 27, 2024
57a2676
Samples
swhitty Jun 27, 2024
053e908
Merge pull request #45 from swhitty/absolute-units
swhitty Jun 27, 2024
858f80f
Add RGBA enum to DOM.Color
EricAtomic Jul 7, 2024
2258006
Support alpha when rendering
EricAtomic Jul 7, 2024
f4bfedb
Add the sample
EricAtomic Jul 7, 2024
ac3a5bb
Refine the sample
EricAtomic Jul 7, 2024
cb87403
Refactor alpha into current types
EricAtomic Jul 7, 2024
502ef1d
Update tests
EricAtomic Jul 7, 2024
b5a1ba7
Fix color encoding
EricAtomic Jul 7, 2024
e4fc708
fix: tvOS & watchOS
EyreFree Jul 25, 2024
67d6bb3
Merge pull request #48 from EyreFree/main
swhitty Aug 30, 2024
a708dc1
Merge pull request #47 from EricAtomic/add-rgba-support
swhitty Aug 30, 2024
7d96c4b
[TECH] - Fix multiplication tests
swhitty Aug 30, 2024
22d55e0
Remove old
swhitty Aug 30, 2024
67ed5e4
fix scheme
swhitty Aug 30, 2024
9de08c3
remove percent encoding from URL fragments
swhitty Oct 11, 2024
196126c
Merge pull request #50 from swhitty/fix-urlencoded-fragment
swhitty Oct 11, 2024
fb79a0a
Swift 6 CI
swhitty Oct 13, 2024
8a1a25c
Support display:block
swhitty Nov 5, 2024
bf943ce
Merge pull request #54 from swhitty/display-block
swhitty Nov 5, 2024
d80b1a0
Update Image.swift
alpennec Nov 5, 2024
a7e5a93
Merge pull request #56 from alpennec/main
swhitty Nov 5, 2024
65d5db7
0.18.1
swhitty Nov 21, 2024
7429012
swift 6 fixes --enable-code-coverage
swhitty Dec 3, 2024
54e2b01
Clips Path should preserve transforms
swhitty Feb 2, 2025
610f7e3
Fix tests
swhitty Feb 2, 2025
7376d39
add return
swhitty Feb 2, 2025
f1948c0
Xcode 16.2
swhitty Feb 11, 2025
9f9f6bc
abc.svg
swhitty Feb 11, 2025
4cc2d92
0.18.2
swhitty Feb 11, 2025
1e34922
rename cli
swhitty Feb 11, 2025
feb12e3
README
swhitty Feb 11, 2025
e85abb3
swift package index badges
swhitty Feb 11, 2025
ce8c6e5
fix quadratic curve
swhitty Feb 13, 2025
3f470d7
Merge pull request #63 from swhitty/fix-quadratic-curve
swhitty Feb 13, 2025
f36e1d4
Fix clamped when nan exists
swhitty Feb 14, 2025
4217dec
Merge pull request #65 from swhitty/vectorAngle-nan
swhitty Feb 14, 2025
2cfd97c
0.18.3
swhitty Feb 14, 2025
3d021b8
nested svg sample
swhitty Feb 17, 2025
15e34dc
support nested svg
swhitty Feb 18, 2025
dac2d26
Merge pull request #67 from swhitty/nested-svg
swhitty Feb 18, 2025
107eaee
remove dead code
swhitty Feb 18, 2025
7fb7fe0
protect against possible trap
swhitty Feb 18, 2025
70170d2
0.19.0
swhitty Feb 18, 2025
a3553a4
whileloop logo
swhitty Feb 18, 2025
51cd546
SVGView
swhitty Feb 19, 2025
b008e11
Merge pull request #68 from swhitty/SVGView
swhitty Feb 19, 2025
0c5d464
Simplify Example App
swhitty Feb 22, 2025
d9cbb20
testRasterize
swhitty Feb 22, 2025
ff00ef7
Delete CHANGELOG.md
swhitty Feb 23, 2025
b1d4a2d
Delete .swift-version
swhitty Feb 23, 2025
79a5130
remove @objc SVGImage
swhitty Feb 23, 2025
8751702
Merge pull request #69 from swhitty/remove-svgImage-objc
swhitty Feb 23, 2025
319d62e
Hashable
swhitty Feb 23, 2025
46e8cdd
SVG+Hashable
swhitty Feb 23, 2025
85d25f7
Swift 5 conformance
swhitty Feb 23, 2025
62be73d
Merge pull request #70 from swhitty/SVG+Hashable
swhitty Feb 23, 2025
36b3266
xml helper
swhitty Feb 23, 2025
172c636
@retroActive conformance in tests
swhitty Feb 23, 2025
b6f681e
scale SVG
swhitty Feb 23, 2025
ab0c50c
translate and expand
swhitty Feb 23, 2025
5177eef
size
swhitty Feb 23, 2025
a43bfea
linux transformation stubs
swhitty Feb 23, 2025
9df5bfe
Deprecate Insets
swhitty Feb 23, 2025
dbeb76f
renames +SVG
swhitty Feb 23, 2025
9bbc820
Merge pull request #71 from swhitty/SVG+Transform
swhitty Feb 23, 2025
5ee2fab
restore rasterize with size
swhitty Feb 23, 2025
22129cc
Update README.md
swhitty Feb 23, 2025
a308a6a
0.20.0
swhitty Feb 23, 2025
bcf8f8d
Update README.md
swhitty Feb 23, 2025
e411f6f
Update README.md
swhitty Feb 23, 2025
51f1bf1
fix grammar within API
swhitty Feb 23, 2025
366203d
Update README.md
swhitty Feb 23, 2025
90f94b8
fix linux
swhitty Feb 23, 2025
d3e5f93
Update SVGView.swift
swhitty Feb 23, 2025
c83a211
test SVG Hashable
swhitty Feb 23, 2025
9e7e219
Update SVG.swift
swhitty Feb 23, 2025
3fbad57
gardening
swhitty Feb 23, 2025
d214436
Update README.md
swhitty Mar 8, 2025
f99fb73
Update README.md
swhitty Mar 16, 2025
95b23f7
formatting
swhitty Mar 21, 2025
d9797bc
fix example
swhitty Mar 21, 2025
0f1bcc3
accept missing namespace
swhitty Mar 21, 2025
00ec241
Merge pull request #74 from swhitty/accept-empty-namespace
swhitty Mar 21, 2025
604df92
Swift 5.8
swhitty Mar 22, 2025
c3318d7
Android support
marcprux Mar 26, 2025
85b0f65
Merge pull request #75 from marcprux/main
swhitty Mar 29, 2025
3ca44c8
adding CommandState
swhitty Apr 12, 2025
2377c68
adding CommandState
swhitty Apr 12, 2025
b850ae1
enum RenderContents
swhitty Apr 13, 2025
63a6201
default ColorConverter
swhitty Apr 13, 2025
84e7452
iterative traversal parser
swhitty Apr 11, 2025
9d59a6b
iterative traversal builder
swhitty Apr 11, 2025
c264cb4
iterative traversal command generator
swhitty Apr 13, 2025
a69e747
deep nested sample image
swhitty Apr 13, 2025
7bf84f7
Merge pull request #76 from swhitty/iterative-traversal
swhitty Apr 13, 2025
d5c6412
make SVG Sendable
swhitty Apr 13, 2025
a8bbc61
Merge pull request #77 from swhitty/sendable
swhitty Apr 13, 2025
07ecf45
0.21.0
swhitty Apr 13, 2025
54dbba2
swift 6
swhitty Apr 13, 2025
24060d3
Merge pull request #78 from swhitty/swift-6
swhitty Apr 13, 2025
041b689
@MainActor defaultScale
swhitty Apr 13, 2025
09af6a8
Update GitHub Actions for Swift 6.1 (#79)
swhitty Apr 13, 2025
4377bcf
Update README.md
swhitty Apr 13, 2025
fff6a2f
visionOS
swhitty Apr 14, 2025
2a36e6c
samples
swhitty Apr 14, 2025
e916dd4
DOM Module
swhitty May 24, 2025
2cf7e1e
fix: visionos in podspec
EyreFree May 24, 2025
7882f5b
SwiftDrawDOM
swhitty May 26, 2025
9b1b26f
cocoapod package access
swhitty May 29, 2025
a4b5451
SwiftDrawDOM
swhitty May 29, 2025
a195947
0.22.0
swhitty May 29, 2025
1b4d502
DOM elements are not actually Sendable
swhitty Jun 2, 2025
5aff737
SwiftDraw/Sources
swhitty Jun 2, 2025
515693a
Warn Swift 5.9
swhitty Jun 2, 2025
8fe56f5
Swift 6.1.2
swhitty Jun 3, 2025
7a9047d
Xcode 16.4
swhitty Jun 5, 2025
bbcb6e7
remove Swift 5.9 support
swhitty Jul 1, 2025
335e287
xcode 26 / swift 6.2
swhitty Jul 1, 2025
44aabdd
Handle empty Path definition
ruslansokolov-harmonic Aug 4, 2025
1d02849
handle path with just whitespace
swhitty Aug 5, 2025
af35a5b
reduces strictness when parsing rbg() colors
swhitty Aug 5, 2025
ea86ece
Merge pull request #87 from swhitty/reduce-strictness-parseColor
swhitty Aug 5, 2025
231c58c
align SFSymbols left and right to the guides
swhitty Aug 5, 2025
dd11d1d
Merge pull request #88 from swhitty/align-left-right
swhitty Aug 5, 2025
73cb83c
--legacy option
swhitty Aug 5, 2025
d30c94b
Merge pull request #89 from swhitty/legacy-alignment
swhitty Aug 5, 2025
f0eeaba
kebab-case options
swhitty Aug 5, 2025
676d64b
0.23.0
swhitty Aug 5, 2025
c35f454
kebab-case options
swhitty Aug 5, 2025
f38779b
Merge pull request #90 from swhitty/kebab-case
swhitty Aug 5, 2025
a535740
0.23.0
swhitty Aug 7, 2025
9d4804c
support small, medium and large SFSymbols
swhitty Aug 9, 2025
1355dce
Merge pull request #92 from swhitty/sfsymbol-size
swhitty Aug 9, 2025
3553cd6
handle CSS declarations with multiple selectors
swhitty Aug 26, 2025
5886ae2
Merge pull request #95 from swhitty/multiple-selectors
swhitty Aug 26, 2025
f2cb554
resolve clipPaths via stylesheet
swhitty Aug 26, 2025
f946d7b
Merge pull request #96 from swhitty/resolve-clipPath
swhitty Aug 26, 2025
37f3ad3
convert Mask to GraphicsElement
swhitty Aug 27, 2025
4fd2438
Merge pull request #98 from swhitty/mask-graphics-element
swhitty Aug 27, 2025
dbb4ef9
0.24.0
swhitty Aug 29, 2025
242ff37
Swift 6.0+
swhitty Aug 30, 2025
68d3a60
InternalImportsByDefault
swhitty Aug 30, 2025
39589f5
Merge pull request #99 from swhitty/swift-6
swhitty Aug 30, 2025
a519f08
swift testing
swhitty Aug 30, 2025
0c8dec1
swift-testing
swhitty Aug 30, 2025
5f52744
Merge pull request #100 from swhitty/swift-testing
swhitty Aug 30, 2025
cc2eaa8
[gardening]
swhitty Aug 30, 2025
eb37aaa
swift-testing
swhitty Aug 30, 2025
55dfc53
remove clipMask
swhitty Aug 31, 2025
3c12372
estimatedCost of SVG commands
swhitty Aug 31, 2025
20a5e7f
SVGCache
swhitty Aug 31, 2025
af422b9
Merge pull request #101 from swhitty/svg-cache
swhitty Aug 31, 2025
fb2b5b2
resizable()
swhitty Sep 6, 2025
da0e946
Update README.md
swhitty Sep 6, 2025
445af85
Update README.md
swhitty Sep 6, 2025
1474c46
support capInsets
swhitty Sep 7, 2025
23ba756
backport SVGView to iOS 13 / macOS 10.15
swhitty Sep 7, 2025
b41e2dc
0.25.0
swhitty Sep 7, 2025
cab8c9a
fix watchOS
swhitty Sep 7, 2025
f97bd06
remove visionOS from podspec
swhitty Sep 7, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 26 additions & 17 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@ on:
workflow_dispatch:

jobs:
xcode_15_3:
runs-on: macos-14
xcode_16_4:
runs-on: macos-15
env:
DEVELOPER_DIR: /Applications/Xcode_15.3.app/Contents/Developer
DEVELOPER_DIR: /Applications/Xcode_16.4.app/Contents/Developer
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Version
run: swift --version
- name: Build
run: swift test --enable-code-coverage --filter do_not_test
run: swift build --build-tests --enable-code-coverage
- name: Test
run: swift test --enable-code-coverage --skip-build
run: swift test --skip-build --enable-code-coverage
- name: Gather code coverage
run: xcrun llvm-cov export -format="lcov" .build/debug/SwiftDrawPackageTests.xctest/Contents/MacOS/SwiftDrawPackageTests -instr-profile .build/debug/codecov/default.profdata > coverage_report.lcov
- name: Upload Coverage
Expand All @@ -27,10 +27,10 @@ jobs:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage_report.lcov

xcode_15_2:
runs-on: macos-14
xcode_26:
runs-on: macos-15
env:
DEVELOPER_DIR: /Applications/Xcode_15.2.app/Contents/Developer
DEVELOPER_DIR: /Applications/Xcode_26.0.app/Contents/Developer
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -41,10 +41,10 @@ jobs:
- name: Test
run: swift test --skip-build

xcode_14_3:
runs-on: macos-13
xcode_16_3:
runs-on: macos-15
env:
DEVELOPER_DIR: /Applications/Xcode_14.3.app/Contents/Developer
DEVELOPER_DIR: /Applications/Xcode_16.2.app/Contents/Developer
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -55,9 +55,10 @@ jobs:
- name: Test
run: swift test --skip-build

linux_5_7:

linux_6:
runs-on: ubuntu-latest
container: swift:5.7
container: swift:6.0.3
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -68,9 +69,9 @@ jobs:
- name: Test
run: swift test --skip-build

linux_5_9:
linux_6_1:
runs-on: ubuntu-latest
container: swift:5.9
container: swift:6.1.2
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -81,9 +82,9 @@ jobs:
- name: Test
run: swift test --skip-build

linux_5_10:
linux_swift_6_2:
runs-on: ubuntu-latest
container: swift:5.10
container: swiftlang/swift:nightly-6.2-noble
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -93,3 +94,11 @@ jobs:
run: swift build --build-tests
- name: Test
run: swift test --skip-build

android:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build and Test
uses: skiptools/swift-android-action@v2
1 change: 0 additions & 1 deletion .swift-version

This file was deleted.

2 changes: 1 addition & 1 deletion .swiftpm/SwiftDraw.xctestplan
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"configurations" : [
{
"id" : "B46FBA9F-0EC4-486D-8336-66AB23577319",
"id" : "5E425660-B3D3-4E55-A5EE-21100C436313",
"name" : "Test Scheme Action",
"options" : {

Expand Down
129 changes: 0 additions & 129 deletions .swiftpm/xcode/xcshareddata/xcschemes/SwiftDraw-Package.xcscheme

This file was deleted.

72 changes: 72 additions & 0 deletions .swiftpm/xcode/xcshareddata/xcschemes/SwiftDraw.xcscheme
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1540"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES"
buildArchitectures = "Automatic">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "SwiftDraw"
BuildableName = "SwiftDraw"
BlueprintName = "SwiftDraw"
ReferencedContainer = "container:">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<TestPlans>
<TestPlanReference
reference = "container:.swiftpm/SwiftDraw.xctestplan"
default = "YES">
</TestPlanReference>
</TestPlans>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "SwiftDraw"
BuildableName = "SwiftDraw"
BlueprintName = "SwiftDraw"
ReferencedContainer = "container:">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
26 changes: 0 additions & 26 deletions CHANGELOG.md

This file was deleted.

13 changes: 8 additions & 5 deletions CommandLine/CommandLine.swift
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@

import Foundation
import SwiftDraw
import SwiftDrawDOM

extension SwiftDraw.CommandLine {

Expand Down Expand Up @@ -68,8 +69,8 @@ extension SwiftDraw.CommandLine {
static func printHelp() {
print("")
print("""
swiftdraw, version 0.16.0
copyright (c) 2023 Simon Whitty
swiftdraw, version 0.25.0
copyright (c) 2025 Simon Whitty

usage: swiftdraw <file.svg> [--format png | pdf | jpeg | swift | sfsymbol] [--size wxh] [--scale 1x | 2x | 3x]

Expand All @@ -83,17 +84,19 @@ Options:
--precision maximum number of decimal places
--output optional path of output file

--hideUnsupportedFilters hide elements with unsupported filters.
--hide-unsupported-filters hide elements with unsupported filters.

Available keys for --format swift:
--api api of generated code: appkit | uikit

Available keys for --format sfsymbol:
--insets alignment of regular variant: top,left,bottom,right | auto
--size size category to generate: small, medium large. (default is small)
--ultralight svg file of ultralight variant
--ultralightInsets alignment of ultralight variant: top,left,bottom,right | auto
--ultralight-insets alignment of ultralight variant: top,left,bottom,right | auto
--black svg file of black variant
--blackInsets alignment of black variant: top,left,bottom,right | auto
--black-insets alignment of black variant: top,left,bottom,right | auto
--legacy use the original, less precise alignment logic from earlier swiftdraw versions.


""")
Expand Down
1 change: 0 additions & 1 deletion CommandLine/TextOutputStream+StandardError.swift

This file was deleted.

2 changes: 2 additions & 0 deletions CommandLine/main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@

#if canImport(Darwin)
import Darwin.POSIX
#elseif canImport(Android)
import Android
#else
import Glibc
#endif
Expand Down
Loading