|
@@ -158,11 +158,11 @@ struct Triangle: Shape {
|
|
|
func path(in rect: CGRect) -> Path {
|
|
func path(in rect: CGRect) -> Path {
|
|
|
var path = Path()
|
|
var path = Path()
|
|
|
|
|
|
|
|
- let cornerRadius: CGFloat = 8
|
|
|
|
|
|
|
+ path.move(to: CGPoint(x: rect.midX, y: rect.minY + 10))
|
|
|
|
|
+ path.addLine(to: CGPoint(x: rect.maxX, y: rect.maxY))
|
|
|
|
|
+
|
|
|
|
|
+ path.addQuadCurve(to: CGPoint(x: rect.minX, y: rect.maxY), control: CGPoint(x: rect.midX, y: rect.midY + 10))
|
|
|
|
|
|
|
|
- path.move(to: CGPoint(x: rect.midX, y: rect.minY))
|
|
|
|
|
- path.addLine(to: CGPoint(x: rect.maxX, y: rect.maxY - cornerRadius))
|
|
|
|
|
- path.addQuadCurve(to: CGPoint(x: rect.minX, y: rect.maxY - cornerRadius), control: CGPoint(x: rect.midX, y: rect.maxY))
|
|
|
|
|
path.closeSubpath()
|
|
path.closeSubpath()
|
|
|
|
|
|
|
|
return path
|
|
return path
|
|
@@ -215,6 +215,6 @@ struct TriangleShape: View {
|
|
|
.fill(color)
|
|
.fill(color)
|
|
|
.frame(width: 35, height: 35)
|
|
.frame(width: 35, height: 35)
|
|
|
.rotationEffect(.degrees(90))
|
|
.rotationEffect(.degrees(90))
|
|
|
- .offset(x: 70)
|
|
|
|
|
|
|
+ .offset(x: 85)
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|