-
-
Notifications
You must be signed in to change notification settings - Fork 46
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Describe the bug
SVG rectangles with the rx
attribute are converted to rectangles without rounded corners.
To Reproduce
<svg width="22" height="4" viewBox="0 0 22 4" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="22" height="4" rx="2" fill="black"/>
</svg>
struct IconMinusShape: Shape {
func path(in rect: CGRect) -> Path {
var path = Path()
let width = rect.size.width
let height = rect.size.height
path.addRect(CGRect(x: 0, y: 0, width: width, height: height))
return path
}
}
Expected behavior
In this case, the rect should be added to the Swift Shape using path.addRoundedRect
but path.addRect
is used instead, resulting in a normal rectangle.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request