From 2d751c98b55f7584e955af25474311f1317048c5 Mon Sep 17 00:00:00 2001 From: Kristian Trenskow Date: Sat, 23 May 2026 20:22:50 +0200 Subject: [PATCH] `SVGView` made public. --- Sources/VectorPlus/SwiftUI/SVGView.swift | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Sources/VectorPlus/SwiftUI/SVGView.swift b/Sources/VectorPlus/SwiftUI/SVGView.swift index 81940a7..657c6df 100644 --- a/Sources/VectorPlus/SwiftUI/SVGView.swift +++ b/Sources/VectorPlus/SwiftUI/SVGView.swift @@ -3,12 +3,16 @@ import Swift2D import SwiftSVG import SwiftUI -struct SVGView: View { +public struct SVGView: View { let svg: SVG private var paths: [SwiftSVG.Path] { svg.paths ?? [] } private var content: [(Int, SwiftSVG.Path)] { Array(zip(paths.indices, paths)) } - var body: some View { + public init(svg: SVG) { + self.svg = svg + } + + public var body: some View { GeometryReader { geometry in ZStack { ForEach(content, id: \.0) { index, path in