SVG-to-SwiftUI icon indicating copy to clipboard operation
SVG-to-SwiftUI copied to clipboard

</polygon> does not working this sample

Open ghost opened this issue 4 years ago • 1 comments
trafficstars

Sample SVG:

<polygon id="Path" points="7.608 12 2.906 14.472 3.804 9.236 0 5.528 5.257 4.764 7.608 0 9.959 4.764 15.216 5.528 11.412 9.236 12.31 14.472"></polygon>

Return value:

struct MyCustomShape: Shape {
    func path(in rect: CGRect) -> Path {
        var path = Path()
        let width = rect.size.width
        let height = rect.size.height
        
        return path
    }
}

is there any known issue with syntax?

ghost avatar May 30 '21 10:05 ghost

Hey, you can see this repo to see the list of the SVG elements that are supported. Currently <poligon> is one of the tags that is not supported. I'll try implement support for it when I have time, but you could also send a PR with your implementation to that repo ;)

bring-shrubbery avatar Jun 08 '21 09:06 bring-shrubbery