Skip to content

A lightweight, flexible SwiftUI library for rendering SVG path data

License

Notifications You must be signed in to change notification settings

tiagopigatto/swiftui-svg-path

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SvgPath view for SwiftUI

A reworked fork of Damian Mehers' SvgVectorView, with a slightly different take on the API for improved performance and a few extra features:

struct SvgPath_Previews: PreviewProvider {
    static var previews: some View {
        circle.fixedSize() // "ideal" size as specified by the viewbox
  
        circle.frame(width: 100, height: 100) // fit into an explicitly specified frame
              .foregroundColor(.red)
    }

    static let circle = SvgPath.compile(paths: ["M48,24c0,13.255-10.745,24-24,24S0,37.255,0,24S10.745,0,24,0S48,10.745,48,24z"],
                                        viewBox: .init(width: 48, height: 48))
}

About

A lightweight, flexible SwiftUI library for rendering SVG path data

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Swift 100.0%